From 9033d4b6b9b85ab3e502b376daf66ae566c026b6 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 13 Mar 2019 02:51:56 -0400 Subject: libopkbuild: Abort on invalid function arguments Shift arguments and abort instead of returning 125. Incorrect numbers of function arguments suggest application/library incompatibilities or serious errors by the application developer. Either way, the application developer should be made immediately aware of this (and not allowed to simply not check return values), and continuing to run and handle any further API calls may be unsafe. --- (limited to 'TODO') diff --git a/TODO b/TODO index 3bf6738..4f8cfa3 100644 --- a/TODO +++ b/TODO @@ -40,9 +40,7 @@ Tasks * Drop mksysconf. * In executables, print error (using `printf`) and exit if `ob_set_text_domain()` fails. - * Make `set -e` and drop `return 125` from library functions. `shift` - arguments, and exit (with `kill`) if `shift` returns non-zero (POSIX only - says the shell "may exit"). + * Make `set -e`. * Make `ob_error()` non-fatal and use in libopkbuild in places where functions return on error. -- cgit v0.9.1