forked from ungerik/go-cairo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utilities_error_handling.go
51 lines (47 loc) · 1.09 KB
/
utilities_error_handling.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package cairo
// #cgo LDFLAGS: -lcairo
// #include <cairo/cairo.h>
import "C"
type Status int
// cairo_status_t
const (
STATUS_SUCCESS Status = iota
STATUS_NO_MEMORY
STATUS_INVALID_RESTORE
STATUS_INVALID_POP_GROUP
STATUS_NO_CURRENT_POINT
STATUS_INVALID_MATRIX
STATUS_INVALID_STATUS
STATUS_NULL_POINTER
STATUS_INVALID_STRING
STATUS_INVALID_PATH_DATA
STATUS_READ_ERROR
STATUS_WRITE_ERROR
STATUS_SURFACE_FINISHED
STATUS_SURFACE_TYPE_MISMATCH
STATUS_PATTERN_TYPE_MISMATCH
STATUS_INVALID_CONTENT
STATUS_INVALID_FORMAT
STATUS_INVALID_VISUAL
STATUS_FILE_NOT_FOUND
STATUS_INVALID_DASH
STATUS_INVALID_DSC_COMMENT
STATUS_INVALID_INDEX
STATUS_CLIP_NOT_REPRESENTABLE
STATUS_TEMP_FILE_ERROR
STATUS_INVALID_STRIDE
STATUS_FONT_TYPE_MISMATCH
STATUS_USER_FONT_IMMUTABLE
STATUS_USER_FONT_ERROR
STATUS_NEGATIVE_COUNT
STATUS_INVALID_CLUSTERS
STATUS_INVALID_SLANT
STATUS_INVALID_WEIGHT
STATUS_INVALID_SIZE
STATUS_USER_FONT_NOT_IMPLEMENTED
STATUS_DEVICE_TYPE_MISMATCH
STATUS_DEVICE_ERROR
)
func (self Status) String() string {
return C.GoString(C.cairo_status_to_string(C.cairo_status_t(self)))
}