Skip to content
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

Return "generic" error if a function returns an error state but does … #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hillu
Copy link

@hillu hillu commented May 12, 2017

…not set error_code

Close #13

The underlying problem is documented in
hercules-team/augeas#464

@dominikh
Copy link
Owner

Are you sure that this change doesn't break other functions? We do only call error when ret is -1 or less than 0 (depending on the function), but I don't remember if any function returns a negative value while not having encountered an error.

@hillu
Copy link
Author

hillu commented May 12, 2017

I am not quite sure about New(). Other than that, the error() method is only called in actual error paths, i.e. if the corresponding Augeas C API function has returned an error value (usually -1 or otherwise negative).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants