[cairo] Idle thoughts on error propagation
behdad at behdad.org
Thu May 1 15:30:23 PDT 2008
On Thu, 2008-05-01 at 15:29 -0700, Vladimir Vukicevic wrote:
> > My answer to that is "Yes. A single error means that the surface
> > not contain the drawing that it's expected to have, so it should be
> > an error state."
> I disagree here... The cairo_t has no foreknowledge of the contents
> that are on the surface -- if the application wants to decide that
> failing rendering on a cairo_t means that the surface is invalid,
> should be up to the app; it shouldn't be forced on them.
What kind of errors do you have in mind here? We are going in the
direction that all retained errors are either irrecoverable or
programming errors. What would an application has to decide about upon
out-of-memory? Programming error on the other hand, should simply be
I agree that this change may cause some pain initially. But then again,
it most probably wouldn't for GTK+-created surfaces, and PS/PDF/SVG are
typically generated using on cr.
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo