[cairo] error handling
Baz
brian.ewins at gmail.com
Tue May 29 18:48:10 PDT 2007
On 29/05/07, Behdad Esfahbod <behdad at behdad.org> wrote:
> On Tue, 2007-05-29 at 11:10 +0100, Baz wrote:
> >The first problem is something we should just fix, right?
> Right. And Chris's patch does this I assume.
Yes, it's spot on.
> > The policy on when to return a status_t [etc...].
point taken. I made the change for each of these:
cairo_scaled_font_glyph_extents
cairo_scaled_font_text_extents
cairo_set_font_face
cairo_select_font_face
cairo_glyph_extents
cairo_text_extents
cairo_glyph_path
cairo_text_path
cairo_show_glyphs
cairo_show_text
cairo_get_current_point
Patches here:
http://gitweb.freedesktop.org/?p=users/brianewins/cairo;a=shortlog;h=return-status
b0f401e1868161da6e6a81aa108df2e37077937d to
6befafab89be36c32b853629e87d6eee69df4979
> > Oh while we're at it - get_current_point should return a status_t too
> > :) (I think this has been discussed before)
>
> Yes.
The tests weren't setting the current point before show_text or
text_extents, so I had 13 failures to fix - the last patch. The only
one of these that might be controversial is the invalid-matrix test -
since it checks the status of a cairo_t when I've converted the error
it's looking for into a return value.
More information about the cairo
mailing list