[cairo] Making it easier to track down errors
Owen Taylor
otaylor at redhat.com
Fri Jun 17 11:30:48 PDT 2005
On Fri, 2005-06-17 at 11:24 -0700, Carl Worth wrote:
> On Thu, 16 Jun 2005 22:55:54 +0200 (CEST), Olivier Andrieu wrote:
> > Nice. Would it be safe for language bindings to raise exceptions at
> > this point ? (That means that the _cairo_error() call would not return
> > and the calling function should have done all its cleanup before it
> > calls _cairo_error).
>
> I think we could quite easily guarantee that the most cairo would ever
> want to do after _cairo_error is to return (and perhaps return a
> value) from a cairo entry point.
>
> In fact, the implementation is extremely close to that already. And
> the attached patch shuffles the few calls to free needed in order to
> completely satisfy that constraint. I've gone ahead and committed it
> now, (the close examination of every _cairo_error call turned up a
> couple of bugs that I had reintroduced which are also fixed in this
> patch).
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.
Regards,
Owen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050617/b8c48c2e/attachment.pgp
More information about the cairo
mailing list