Re: gerror.c revisited



on 8/31/00 9:14 AM, Owen Taylor at otaylor@redhat.com wrote:

>> +    g_error ("%s, %d, %s.\n", err->domain, err->code, err->message);

Incredibly tiny nit pick. g_error adds its own "\n", it's a mistake to add
another.

> g_warning ("%s\n", err->message);
> exit(1);

Same for g_warning.

> (We should really add g_fatal() that prints a message and does exit(1)
> without the abort).

I wholeheartedly agree. I think many uses of g_error are actually candidates
for g_fatal. The latter would be for errors with a runtime cause rather than
programmer errors.

Of course the names still don't make clear which is appropriate to use when.

    -- Darin






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