Re: Returning GErrors from more than one domain



Soeren Sandmann <sandmann daimi au dk> writes:
> Soeren Sandmann <sandmann daimi au dk> writes:
> 
> > One solution would be to just return errors, no matter what their
> > domain were.  This would mean that a caller of the function couldn't
> > just switch on the error code.  He would have to first call
> > g_error_domain() to determine the domain of the error.
> 
> Okay, g_error_domain() doesn't exist, but g_error_matches() does. I
> guess this means that the function should just return the errors and
> tell the caller to use g_error_matches() always.
> 
> Sorry about wasting bandwidth about this.

Yes, that's the idea. You're supposed to match on both domain and
code, to avoid copying error codes all over the place.

Havoc



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