[Nut-upsdev] Makefiles driving me NUTs

Arjen de Korte nut+devel at de-korte.org
Sat Jan 13 08:42:54 CET 2007


> IMHO, it would be wrong to use NUT-specific error reporting functions
> in a library. Instead, the library should communicate errors through
> its API, preferably by returning documented exit codes from its
> functions, perhaps setting errno, etc. It should be up to the client
> programs to decide how to report these errors.

Makes perfectly sense. Unfortunately, that means that I'll need to clean
up a few clients that continue on errors, rather than terminating. For
instance, if parsing of configuration files fails, we shouldn't guess that
what we have at that moment, is what the user intended to do, but rather
abort with an explicative error message. Likewise for memory allocation
errors, these should always result in termination.

Best regards, Arjen




More information about the Nut-upsdev mailing list