Re: API: get error message

Adrian Johnson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On 14/11/17 06:03, Bill Spitzak wrote:
> This would be very useful.
> 
> It should be called "cairo_xxx_strerror" for consistency with some
> other library apis. Not clear what goes in the middle but I don't
> think it should say "surface" because the errors are per-context,
> right?

"strerror" is not consistent with the cairo style of whole words
separated by underscores. Also, strerror() is for converting an error
number to text. We already have cairo_status_to_string() for that purpose.

Based on feedback I propose adding the function for all objects that can
use it: surface, cairo context, and scaled font.

const char *
cairo_surface_get_error_explanation()

const char *
cairo_get_error_explanation()

const char *
cairo_scaled_font_get_error_explanation()

Any alternative suggestions for the "error_explanation" name?
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.