Returning GErrors from more than one domain



Suppose a function can fail with errors from more than one domain. 

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.

The other solution would be to copy all possible error codes into the
function's "native" error domain.

I am not too happy about either alternative.  What is the solution?


Søren



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