Greg Kurz <gr...@kaod.org> writes:

> Option parsing fonctions are called with &error_fatal, which

functions

> causes error_setg() to call exit() and the hints are never
> printed.
>
> Use an intermediate error object so that exit() happens in
> error_propagate() after error_append_hint() could be called.

Hmm.

Code that creates error objects should not need to know how they are
handled.

Your patch shows that error_append_hint() requires error_propagate() to
work regardless of how the error is handled.  We should amend
error_append_hint()'s contract in error.h to spell this out, and search
the tree for more misuse of error_append_hint().

Reply via email to