31 #ifndef CPL_ERROR_H_INCLUDED 32 #define CPL_ERROR_H_INCLUDED 61 #ifdef STRICT_CPLERRORNUM_TYPE 81 CPLE_AWSBucketNotFound,
82 CPLE_AWSObjectNotFound,
84 CPLE_AWSInvalidCredentials,
85 CPLE_AWSSignatureDoesNotMatch,
90 typedef int CPLErrorNum;
93 #define CPLE_AppDefined 1 94 #define CPLE_OutOfMemory 2 96 #define CPLE_OpenFailed 4 97 #define CPLE_IllegalArg 5 98 #define CPLE_NotSupported 6 99 #define CPLE_AssertionFailed 7 100 #define CPLE_NoWriteAccess 8 101 #define CPLE_UserInterrupt 9 102 #define CPLE_ObjectNull 10 107 #define CPLE_HttpResponse 11 108 #define CPLE_AWSBucketNotFound 12 109 #define CPLE_AWSObjectNotFound 13 110 #define CPLE_AWSAccessDenied 14 111 #define CPLE_AWSInvalidCredentials 15 112 #define CPLE_AWSSignatureDoesNotMatch 16 118 void CPL_DLL CPLError(CPLErr eErrClass, CPLErrorNum err_no,
const char *fmt, ...) CPL_PRINT_FUNC_FORMAT (3, 4);
119 void CPL_DLL CPLErrorV(CPLErr, CPLErrorNum, const
char *, va_list );
126 void CPL_DLL
CPLErrorSetState( CPLErr eErrClass, CPLErrorNum err_no, const
char* pszMsg );
127 void CPL_DLL CPLCleanupErrorMutex(
void );
129 typedef
void (CPL_STDCALL *CPLErrorHandler)(CPLErr, CPLErrorNum, const
char*);
131 void CPL_DLL CPL_STDCALL CPLLoggingErrorHandler( CPLErr, CPLErrorNum, const
char * );
132 void CPL_DLL CPL_STDCALL CPLDefaultErrorHandler( CPLErr, CPLErrorNum, const
char * );
133 void CPL_DLL CPL_STDCALL CPLQuietErrorHandler( CPLErr, CPLErrorNum, const
char * );
134 void CPLTurnFailureIntoWarning(
int bOn );
143 void CPL_DLL CPL_STDCALL CPLDebug( const
char *, const
char *, ... ) CPL_PRINT_FUNC_FORMAT (2, 3);
144 void CPL_DLL CPL_STDCALL
_CPLAssert( const
char *, const
char *,
int ) CPL_NO_RETURN;
147 # define CPLAssert(expr) ((expr) ? (void)(0) : _CPLAssert(#expr,__FILE__,__LINE__)) 149 # define CPLAssert(expr) 158 # define VALIDATE_POINTER_ERR CE_Fatal 160 # define VALIDATE_POINTER_ERR CE_Failure 163 #define VALIDATE_POINTER0(ptr, func) \ 164 do { if( NULL == ptr ) \ 166 CPLErr const ret = VALIDATE_POINTER_ERR; \ 167 CPLError( ret, CPLE_ObjectNull, \ 168 "Pointer \'%s\' is NULL in \'%s\'.\n", #ptr, (func)); \ 171 #define VALIDATE_POINTER1(ptr, func, rc) \ 172 do { if( NULL == ptr ) \ 174 CPLErr const ret = VALIDATE_POINTER_ERR; \ 175 CPLError( ret, CPLE_ObjectNull, \ 176 "Pointer \'%s\' is NULL in \'%s\'.\n", #ptr, (func)); \ 177 return (rc); }} while(0) void CPL_DLL CPLEmergencyError(const char *) CPL_NO_RETURN
Definition: cpl_error.cpp:385
CPLErr CPL_DLL CPL_STDCALL CPLGetLastErrorType(void)
Definition: cpl_error.cpp:743
void CPL_DLL CPL_STDCALL void CPL_DLL CPL_STDCALL _CPLAssert(const char *, const char *, int) CPL_NO_RETURN
Definition: cpl_error.cpp:1192
void CPL_DLL CPL_STDCALL CPLPushErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:1062
const char CPL_DLL *CPL_STDCALL CPLGetLastErrorMsg(void)
Definition: cpl_error.cpp:767
void CPL_DLL *CPL_STDCALL CPLGetErrorHandlerUserData(void)
Definition: cpl_error.cpp:153
CPLErrorHandler CPL_DLL CPL_STDCALL CPLSetErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:1041
CPLErrorNum CPL_DLL CPL_STDCALL CPLGetLastErrorNo(void)
Definition: cpl_error.cpp:719
CPLErrorHandler CPL_DLL CPL_STDCALL CPLSetErrorHandlerEx(CPLErrorHandler, void *)
Definition: cpl_error.cpp:962
void CPL_DLL CPL_STDCALL CPLSetCurrentErrorHandlerCatchDebug(int bCatchDebug)
Definition: cpl_error.cpp:1158
void CPL_DLL CPL_STDCALL CPLPushErrorHandlerEx(CPLErrorHandler, void *)
Definition: cpl_error.cpp:1086
void CPL_DLL CPL_STDCALL CPLErrorReset(void)
Definition: cpl_error.cpp:632
void CPL_DLL CPLErrorSetState(CPLErr eErrClass, CPLErrorNum err_no, const char *pszMsg)
Definition: cpl_error.cpp:666
void CPL_DLL CPL_STDCALL CPLPopErrorHandler(void)
Definition: cpl_error.cpp:1120