| 1 |
|
| 2 |
@c %start of fragment |
| 3 |
|
| 4 |
@node Error handling |
| 5 |
@chapter Error handling |
| 6 |
Decoding cairo's status |
| 7 |
|
| 8 |
@section Overview |
| 9 |
Cairo uses a single status type to represent all kinds of errors. A |
| 10 |
status value of @samp{CAIRO_STATUS_SUCCESS} represents no error and has |
| 11 |
an integer value of zero. All other status values represent an error. |
| 12 |
|
| 13 |
Cairo's error handling is designed to be easy to use and safe. All major |
| 14 |
cairo objects @dfn{retain} an error status internally which can be |
| 15 |
queried anytime by the users using cairo*_status() calls. In the mean |
| 16 |
time, it is safe to call all cairo functions normally even if the |
| 17 |
underlying object is in an error status. This means that no error |
| 18 |
handling code is required before or after each individual cairo function |
| 19 |
call. |
| 20 |
|
| 21 |
@section Usage |
| 22 |
@include defuns-cairo-status.xml.texi |
| 23 |
|
| 24 |
@c %end of fragment |