diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-13 03:08:52 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-13 03:08:52 (EDT) |
commit | 74f1abf97030d1799ebaf9790d50c003408bd0a3 (patch) | |
tree | c90853084f365a6ea02e66dea233360ed5165edc | |
parent | 9033d4b6b9b85ab3e502b376daf66ae566c026b6 (diff) |
ob_error(): Make non-fatal
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | lib/output.sh | 5 |
2 files changed, 4 insertions, 5 deletions
@@ -41,8 +41,8 @@ Tasks * In executables, print error (using `printf`) and exit if `ob_set_text_domain()` fails. * Make `set -e`. - * Make `ob_error()` non-fatal and use in libopkbuild in places where functions - return on error. + * Use `ob_error()` in libopkbuild in places where functions return on error. + * In executables, exit on errors. Copyright --------- diff --git a/lib/output.sh b/lib/output.sh index 9d08759..2d11fe7 100644 --- a/lib/output.sh +++ b/lib/output.sh @@ -24,8 +24,7 @@ ## of \fIformat\fP. ## @operand arguments opt Arguments to be printed, as referenced by ## \fIformat\fP. -## @return This function does not return. It causes the application to exit -## with an exit status of 1. +## @return Returns 0. ## @stderr This function prints the formatted message, preceded by the program ## name and "Error:", to stderr. ## @pure no This function causes the current shell to exit. @@ -36,7 +35,7 @@ ob_error() printf "$(_get_msg 'output_error_format')\n" "${0##*/}" "${@}" >&2 - exit 1 + return 0 } ## @brief Print a warning message |