enum

Cairo::Status

Inherits Enum / Comparable / Value / Object

Cairo uses a single status type to represent all kinds of errors. A status value of Success represents no error and has an integer value of zero. All other status values represent an error.

Cairo's error handling is designed to be easy to use and safe. All major cairo objects retain an error status internally which can be queried anytime by the users using status calls. In the mean time, it is safe to call all cairo functions normally even if the underlying object is in an error status. This means that no error handling code is required before or after each individual cairo function call.

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

New entries may be added in future versions. Use Status#to_string to get a human-readable representation of an error message.

Constants

Success = 0

No error has occurred.

NoMemory = 1

Out of memory.

InvalidRestore = 2

Context#restore called without matching Context#save.

InvalidPopGroup = 3

No saved group to pop, i.e. Context#pop_group without matching Context#push_group.

NoCurrentPoint = 4

No current point defined.

InvalidMatrix = 5

Invalid matrix (not invertible).

InvalidStatus = 6

Invalid value for an input Status.

NullPointer = 7

NULL pointer.

InvalidString = 8

Input string not valid UTF-8.

InvalidPathData = 9

Input path data not valid.

ReadError = 10

Error while reading from input stream.

WriteError = 11

Error while writing to output stream.

SurfaceFinished = 12

Target surface has been finished.

SurfaceTypeMismatch = 13

The surface type is not appropriate for the operation.

PatternTypeMismatch = 14

The pattern type is not appropriate for the operation.

InvalidContent = 15

Invalid value for an input Content.

InvalidFormat = 16

Invalid value for an input Format.

InvalidVisual = 17

Invalid value for an input Visual.

FileNotFound = 18

File not found.

InvalidDash = 19

Invalid value for a dash setting.

InvalidDscComment = 20

Invalid value for a DSC comment.

InvalidIndex = 21

Invalid index passed to getter.

ClipNotRepresentable = 22

Clip region not representable in desired format.

TempFileRrror = 23

Error creating or writing to a temporary file.

InvalidStride = 24

Invalid value for stride.

FontTypeMismatch = 25

The font type is not appropriate for the operation.

UserFontImmutable = 26

The user-font is immutable.

UserFontError = 27

Error occurred in a user-font callback function.

NegativeCount = 28

Negative number used where it is not allowed.

InvalidClusters = 29

Input clusters do not represent the accompanying text and glyph array.

InvalidSlant = 30

Invalid value for an input FontSlant.

InvalidWeight = 31

Invalid value for an input FontWeight.

InvalidSize = 32

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

UserFontNotImplemented = 33

User-font method not implemented.

DeviceTypeMismatch = 34

The device type is not appropriate for the operation.

DeviceError = 35

An operation to the device caused an unspecified error.

InvalidMeshConstruction = 36

A mesh pattern construction operation was used outside of a Pattern#begin_patch/Pattern#end_patch pair.

DeviceFinished = 37

Target device has been finished.

Jbig2GlobalMissing = 38

Cairo::C::LibCairo::MIME_TYPE_JBIG2_GLOBAL_ID has been used on at least one image but no image provided Cairo::C::LibCairo::MIME_TYPE_JBIG2_GLOBAL.

PngError = 39

Error occurred in libpng while reading from or writing to a PNG file.

FreeTypeError = 40

Error occurred in libfreetype.

Win32GdiError = 41

Error occurred in the Windows Graphics Device Interface.

TagError = 42

Invalid tag name, attributes, or nesting.

LastStatus = 43

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.

Instance methods

clip_not_representable?

Returns true if this enum value equals ClipNotRepresentable

Source
device_error?

Returns true if this enum value equals DeviceError

Source
device_finished?

Returns true if this enum value equals DeviceFinished

Source
device_type_mismatch?

Returns true if this enum value equals DeviceTypeMismatch

Source
file_not_found?

Returns true if this enum value equals FileNotFound

Source
font_type_mismatch?

Returns true if this enum value equals FontTypeMismatch

Source
free_type_error?

Returns true if this enum value equals FreeTypeError

Source
invalid_clusters?

Returns true if this enum value equals InvalidClusters

Source
invalid_content?

Returns true if this enum value equals InvalidContent

Source
invalid_dash?

Returns true if this enum value equals InvalidDash

Source
invalid_dsc_comment?

Returns true if this enum value equals InvalidDscComment

Source
invalid_format?

Returns true if this enum value equals InvalidFormat

Source
invalid_index?

Returns true if this enum value equals InvalidIndex

Source
invalid_matrix?

Returns true if this enum value equals InvalidMatrix

Source
invalid_mesh_construction?

Returns true if this enum value equals InvalidMeshConstruction

Source
invalid_path_data?

Returns true if this enum value equals InvalidPathData

Source
invalid_pop_group?

Returns true if this enum value equals InvalidPopGroup

Source
invalid_restore?

Returns true if this enum value equals InvalidRestore

Source
invalid_size?

Returns true if this enum value equals InvalidSize

Source
invalid_slant?

Returns true if this enum value equals InvalidSlant

Source
invalid_status?

Returns true if this enum value equals InvalidStatus

Source
invalid_stride?

Returns true if this enum value equals InvalidStride

Source
invalid_string?

Returns true if this enum value equals InvalidString

Source
invalid_visual?

Returns true if this enum value equals InvalidVisual

Source
invalid_weight?

Returns true if this enum value equals InvalidWeight

Source
jbig2_global_missing?

Returns true if this enum value equals Jbig2GlobalMissing

Source
last_status?

Returns true if this enum value equals LastStatus

Source
negative_count?

Returns true if this enum value equals NegativeCount

Source
no_current_point?

Returns true if this enum value equals NoCurrentPoint

Source
no_memory?

Returns true if this enum value equals NoMemory

Source
null_pointer?

Returns true if this enum value equals NullPointer

Source
pattern_type_mismatch?

Returns true if this enum value equals PatternTypeMismatch

Source
png_error?

Returns true if this enum value equals PngError

Source
read_error?

Returns true if this enum value equals ReadError

Source
success?

Returns true if this enum value equals Success

Source
surface_finished?

Returns true if this enum value equals SurfaceFinished

Source
surface_type_mismatch?

Returns true if this enum value equals SurfaceTypeMismatch

Source
tag_error?

Returns true if this enum value equals TagError

Source
temp_file_rrror?

Returns true if this enum value equals TempFileRrror

Source
to_string

Provides a human-readable description.

Source
user_font_error?

Returns true if this enum value equals UserFontError

Source
user_font_immutable?

Returns true if this enum value equals UserFontImmutable

Source
user_font_not_implemented?

Returns true if this enum value equals UserFontNotImplemented

Source
win32_gdi_error?

Returns true if this enum value equals Win32GdiError

Source
write_error?

Returns true if this enum value equals WriteError

Source