[cairo] Making cairo_error weak
Carl Worth
cworth at cworth.org
Wed Aug 17 14:38:54 PDT 2005
On Wed, 17 Aug 2005 13:43:15 -0400, wrote:
> Quoting Keith Packard <keithp at keithp.com>:
>
> > I've been fairly happy using environment variables to control
> > diagnostic printfs of this nature. It means you can see problems
> > even when the application developer hasn't made any provisions for
> > such.
>
> So long as the messages are off by default. Unexpected diagnostic
> printfs can be very obnoxious on e.g. win32, as I experienced with
> libart.
Yes, that's my plan.
By default, I want cairo to never print, but I want to add printing in
_cairo_error that's conditional on an environment variable.
Suggestions for the name of the variable?
Meanwhile, we'll also likely want a way to get the calling
__FUNCTION__ to that print message, and we'll likely also need to push
a few calls of _cairo_error up closer so that the function name that
gets printed is the actual function called by application code, and
not something buried deeper in cairo that won't be helpful to the
person trying to fix their program based on this message being
printed.
-Carl
PS. The strategy described above is for errors in applications using
cairo that cairo is able to detect. It would likely also be desirable
to implement a separate strategy for printing on error as early as
possible, (as opposed to as late as possible as described above), to
aid in debugging errors in cairo itself.
-------------- 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/20050817/0c176d6e/attachment-0001.pgp
More information about the cairo
mailing list