Re: abort in gmessages.c



On Wed, 2003-05-21 at 10:54, Emmanuel Briot wrote:
> Please consider removing the two calls to abort() in gmessages.c.
> 
> Having such a radical signal prevents the application from handling it
> nicely (for instance transform it into an exception for languages that
> support them). As a result, the application crashes, instead of trying
> to recover.
> 
> Isn't a gtk+ fatal warning enough ? The application is then responsible
> to do whatever it needs to do, possible through a call to
> log_set_handler

g_error() is used only in cases where a fatal, unhandlable
error occurs.

If you find a place where g_error() is used for an error
that could be reasonably handled by an application, it's
worth a bug report, because we should look whether
we need to enhance the API in that error.

Regards,
                                     Owen

P.S. 

 - the same applies to g_warning(); g_warning() is supposed
   to be only used for system misconfiguration and programmer
   error.

 - out of memory is a special case, see long discussions
   of that here previously.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]