[cairo] API: get error message

Adrian Johnson ajohnson at redneon.com
Sat Nov 11 08:53:15 UTC 2017


There a number of status types where cairo could report additional
information on the error:

 CAIRO_STATUS_PNG_ERROR
 CAIRO_STATUS_FREETYPE_ERROR
 CAIRO_STATUS_WIN32_GDI_ERROR
 CAIRO_STATUS_TAG_ERROR

Currently the status just tells us something went wrong. With the above
status types there could be multiple reasons why it might fail.

I'd like to introduce a new function that can retrieve the reason for
the failure.

const char *
cairo_surface_get_error_explanation()

Returns NULL if no error explanation available for the current status
type (including SUCCESS). The returned string is owned by the surface
and will be destroyed when the surface is destroyed.


More information about the cairo mailing list