forked from hercules-team/augeas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it possible for aug_init to report initialization errors
Sometimes initialization fails for mundane reasons, like syntax errors in lens files. So far, it was not possible for callers to report details for these errors, because they always got a NULL augeas handle back. The new flag AUG_NO_ERR_CLOSE causes aug_init to return a handle even if initialization fails, so that callers can use the aug_error* functions to extract error details before calling aug_close. * src/augeas.c (aug_init): return a partially initialized struct augeas if AUG_NO_ERR_CLOSE is set * src/augeas.h (aug_flags): add AUG_NO_ERR_CLOSE * src/augtool.c: call aug_init with AUG_NO_ERR_CLOSE and print errors on initialization failure
- Loading branch information
David Lutterkort
committed
Dec 2, 2011
1 parent
2d378d5
commit 93b695c
Showing
3 changed files
with
44 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters