Re: Musings on the proper use of g_error and GError



Suppose one issues a connect() on a socket fd. Would it be correct to set a GError
if the call returned a "soft" error code like EAGAIN or ECONNREFUSED, but to
throw a hard g_error if it were, e.g. EFAULT?

"Recoverable" is in the eye of the beholder, no?

Also, since "g_error should only be used for programming errors," does that mean that an unrecoverable error, such as failure to allocate memory, are lumped into the category of _programming errors_? THAT is the problem as I see it with the docs.

Programming errors are logical errors made _by the programmer_ (to my way of thinking),
not runtime errors.

Phil





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