[cairo] Error handling patch
Carl Worth
cworth at redhat.com
Thu Jul 28 09:03:15 PDT 2005
On Wed, 27 Jul 2005 20:06:55 -0400, Owen Taylor wrote:
> Here's a patch for this - it was pretty straightforward since font faces
> are by definition immutable. Like everything else here, the new code
> paths aren't really tested, but it seems to work fine when no errors
> are occurring.
Thanks.
> @@ -791,6 +831,9 @@ cairo_scaled_font_create (cairo_font_fac
> cairo_cache_t *cache;
> cairo_status_t status;
>
> + if (font_face->status)
> + return (cairo_scaled_font_t*) &_cairo_scaled_font_nil;
> +
Missing:
_cairo_error (font_face->status);
here?
Or, maybe not, because this isn't a root cause error?
I'm definitely still trying to get a handle on the style
here. Ensuring 1 and 1 only _cairo_error for each error is definitely
a harder thing to get right in the code. I fear we're more likely to
let some errors slip through without a call to _cairo_error at all.
Anyway, the patch here looks good.
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050728/b711c5a2/attachment.pgp
More information about the cairo
mailing list