Re: GException notes




Havoc Pennington <hp@redhat.com> writes:

> So the three variants of the basic scheme are:
> 
> #1 (strtoul() style):
>   clear_global_error();
>   frobate();
>   if (check_whether_global_error_set())
>     handle_error();
> 
>  with optional error-ignore mode:
>   frobate();

There is also #1b, where frobate() does the clear_global_error() 
internally. That has the advantage that it moves the responsibility
from the user to the library writer.

                                        Owen



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