-
Notifications
You must be signed in to change notification settings - Fork 67
Fix error handling regressions in config parser #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@NiLuJe, can you see if you can reproduce the issue you reported (#98 (comment)) with this PR? |
|
Bogus |
|
Seems to be a bit of buffer-chaining issue: Added a bogus entry @ L 23
And, without touching the config file, just opening the NM menu over and over: Details(c.f., the |
|
Commenting out the offending entry doesn't break the chain (meaning I still get a single Config Error menu entry). |
|
To be clear, I'm updating the config file live, on device, via nano. (And closing it). |
|
(And breaking it earlier doesn't help either, but I can't really tell you what the log says, because by this point it's just a repetition of |
That's by design.
That's odd. I'll look into it further tomorrow. Edit: @NiLuJe, what does it say if you add Edit 1: If that shows the old error, does adding |
|
First patch: Second one doesn't build? |
|
Message is up-to-date, and breaking the config differently or fixing it works :) Details |
Looks like I mixed up the function and macro when typing the reply from my phone ;) .
That's good. So it is what I thought it was, which was a regression during the error handling and config parsing refactors where the error handling wasn't updated for the new behaviour. I'm going to make sure everything else is correct and add this fix. I guess the reason why this bug didn't show up for most people is because it only manifests itself if actions (including the error message) haven't been run in-between, since P.S. You can use |
|
Yeah, I realized I'd never actually ran the actual "Config error" entry. I kinda never do since I usually have the log scrolling right in my face ;p. But, in case it matters: the actual content of the popup is also sane after the fix ;). |
|
Everything appears to be correct now. I'm going to merge this. Thanks for finding this regression @NiLuJe! |
This fixes a regression in ee0eb7c (#47) which caused vague error messages to be returned instead of specific error messages from
nm_config_parse__line_*. These functions should have returnedtrueon error, but were returningNULL(i.e.false) instead, causingnm_config_parseto treat it as an unknown line type instead of returning the specific issue with the line. This regression does not cause any issues other than vague error messages being returned for certain errors during config parsing.In addition, this fixes another regression discovered by @NiLuJe where configuration errors would persist in rare situations due to
nm_config_filesnot clearing existing errors as expected. This issue does not happen if the config error menu item is pressed to see the error message sincenm_menu_item_doclears errors.fixes #99