enum Cairo::Status
Overview
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.
Defined in:
cairo/status.crEnum Members
-
Success =
0
-
No error has occurred.
-
NoMemory =
1
-
Out of memory.
-
InvalidRestore =
2
-
Context#restore
called without matchingContext#save
. -
InvalidPopGroup =
3
-
No saved group to pop, i.e.
Context#pop_group
without matchingContext#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 providedCairo::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 Method Summary
- #clip_not_representable?
- #device_error?
- #device_finished?
- #device_type_mismatch?
- #file_not_found?
- #font_type_mismatch?
- #free_type_error?
- #invalid_clusters?
- #invalid_content?
- #invalid_dash?
- #invalid_dsc_comment?
- #invalid_format?
- #invalid_index?
- #invalid_matrix?
- #invalid_mesh_construction?
- #invalid_path_data?
- #invalid_pop_group?
- #invalid_restore?
- #invalid_size?
- #invalid_slant?
- #invalid_status?
- #invalid_stride?
- #invalid_string?
- #invalid_visual?
- #invalid_weight?
- #jbig2_global_missing?
- #last_status?
- #negative_count?
- #no_current_point?
- #no_memory?
- #null_pointer?
- #pattern_type_mismatch?
- #png_error?
- #read_error?
- #success?
- #surface_finished?
- #surface_type_mismatch?
- #tag_error?
- #temp_file_rrror?
-
#to_string : String
Provides a human-readable description.
- #user_font_error?
- #user_font_immutable?
- #user_font_not_implemented?
- #win32_gdi_error?
- #write_error?