cairo_status_t

#cairo_status_t is used to indicate errors that can occur when using Cairo. In some cases it is returned directly by functions. but when using #cairo_t, the last error, if any, is stored in the context and can be retrieved with cairo.context.Context.status.

New entries may be added in future versions. Use cairo.global.statusToString to get a human-readable representation of an error message.

Values

ValueMeaning
Success0

no error has occurred (Since 1.0)

NoMemory1

out of memory (Since 1.0)

InvalidRestore2

cairo.context.Context.restore called without matching cairo.context.Context.save (Since 1.0)

InvalidPopGroup3

no saved group to pop, i.e. cairo.context.Context.popGroup without matching cairo.context.Context.pushGroup (Since 1.0)

NoCurrentPoint4

no current point defined (Since 1.0)

InvalidMatrix5

invalid matrix (not invertible) (Since 1.0)

InvalidStatus6

invalid value for an input #cairo_status_t (Since 1.0)

NullPointer7

null pointer (Since 1.0)

InvalidString8

input string not valid UTF-8 (Since 1.0)

InvalidPathData9

input path data not valid (Since 1.0)

ReadError10

error while reading from input stream (Since 1.0)

WriteError11

error while writing to output stream (Since 1.0)

SurfaceFinished12

target surface has been finished (Since 1.0)

SurfaceTypeMismatch13

the surface type is not appropriate for the operation (Since 1.0)

PatternTypeMismatch14

the pattern type is not appropriate for the operation (Since 1.0)

InvalidContent15

invalid value for an input #cairo_content_t (Since 1.0)

InvalidFormat16

invalid value for an input #cairo_format_t (Since 1.0)

InvalidVisual17

invalid value for an input Visual* (Since 1.0)

FileNotFound18

file not found (Since 1.0)

InvalidDash19

invalid value for a dash setting (Since 1.0)

InvalidDscComment20

invalid value for a DSC comment (Since 1.2)

InvalidIndex21

invalid index passed to getter (Since 1.4)

ClipNotRepresentable22

clip region not representable in desired format (Since 1.4)

TempFileError23

error creating or writing to a temporary file (Since 1.6)

InvalidStride24

invalid value for stride (Since 1.6)

FontTypeMismatch25

the font type is not appropriate for the operation (Since 1.8)

UserFontImmutable26

the user-font is immutable (Since 1.8)

UserFontError27

error occurred in a user-font callback function (Since 1.8)

NegativeCount28

negative number used where it is not allowed (Since 1.8)

InvalidClusters29

input clusters do not represent the accompanying text and glyph array (Since 1.8)

InvalidSlant30

invalid value for an input #cairo_font_slant_t (Since 1.8)

InvalidWeight31

invalid value for an input #cairo_font_weight_t (Since 1.8)

InvalidSize32

invalid value (typically too big) for the size of the input (surface, pattern, etc.) (Since 1.10)

UserFontNotImplemented33

user-font method not implemented (Since 1.10)

DeviceTypeMismatch34

the device type is not appropriate for the operation (Since 1.10)

DeviceError35

an operation to the device caused an unspecified error (Since 1.10)

InvalidMeshConstruction36

a mesh pattern construction operation was used outside of a cairo.global.meshPatternBeginPatch/cairo.global.meshPatternEndPatch pair (Since 1.12)

DeviceFinished37

target device has been finished (Since 1.12)

Jbig2GlobalMissing38

CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID has been used on at least one image but no image provided CAIRO_MIME_TYPE_JBIG2_GLOBAL (Since 1.14)

PngError39

error occurred in libpng while reading from or writing to a PNG file (Since 1.16)

FreetypeError40

error occurred in libfreetype (Since 1.16)

LastStatus45

this is a special value indicating the number of status values defined in this enumeration. When using this value, note that the version of cairo at run-time may have additional status values defined than the value of this symbol at compile-time. (Since 1.10)

Win32GdiError41

error occurred in the Windows Graphics Device Interface (Since 1.16)