34 #include <cxstrutils.h>
36 #include <cpl_error.h>
37 #include <cpl_errorstate.h>
46 typedef struct GiError GiError;
49 static GiError _error ;
51 static cxbool _error_init = FALSE;
52 static cxbool _error_saved = FALSE;
64 giraffe_error_init(
void)
74 giraffe_error_clear(
void)
77 if (_error_init == TRUE) {
87 giraffe_error_push(
void)
90 cx_assert(_error_init == TRUE);
92 _error.state = cpl_errorstate_get();
103 giraffe_error_pop(
void)
106 cx_assert(_error_init == TRUE);
108 if (_error_saved == TRUE) {
110 cpl_errorstate_set(_error.state);
111 _error_saved = FALSE;