[cairo] Making it easier to track down errors

Bill Spitzak spitzak at d2.com
Fri Jun 17 12:55:15 PDT 2005



Owen Taylor wrote:

> This absolutely doesn't work ... Cairo can guarantee it's own behavior,
> it can't guarantee the behavior of other libraries that might use
> Cairo internally; and it's very plausible that a cairo_t might be
> shared between direct usage from the language binding and usage
> from a library that uses cairo internally.

I see no problem here. The programmer is still in control of whether 
Cairo can throw an exception, and if a library around Cairo can't handle 
it, the programmer will know not to set the error function to do it.

I agree with your other complaint, I would prefer a single global cairo 
error handler rather than having to set one per-cairo_t. It would also 
allow errors to be triggered without the calling code having a cairo_t.



More information about the cairo mailing list