31 #ifndef CPL_ERROR_H_INCLUDED 32 #define CPL_ERROR_H_INCLUDED 57 void CPL_DLL CPLError(CPLErr eErrClass,
int err_no,
const char *fmt, ...) CPL_PRINT_FUNC_FORMAT (3, 4);
58 void CPL_DLL CPLErrorV(CPLErr,
int, const
char *, va_list );
65 void CPL_DLL
CPLErrorSetState( CPLErr eErrClass,
int err_no, const
char* pszMsg );
66 void CPL_DLL CPLCleanupErrorMutex(
void );
68 typedef
void (CPL_STDCALL *CPLErrorHandler)(CPLErr,
int, const
char*);
70 void CPL_DLL CPL_STDCALL CPLLoggingErrorHandler( CPLErr,
int, const
char * );
71 void CPL_DLL CPL_STDCALL CPLDefaultErrorHandler( CPLErr,
int, const
char * );
72 void CPL_DLL CPL_STDCALL CPLQuietErrorHandler( CPLErr,
int, const
char * );
73 void CPLTurnFailureIntoWarning(
int bOn );
81 void CPL_DLL CPL_STDCALL CPLDebug( const
char *, const
char *, ... ) CPL_PRINT_FUNC_FORMAT (2, 3);
82 void CPL_DLL CPL_STDCALL
_CPLAssert( const
char *, const
char *,
int );
85 # define CPLAssert(expr) ((expr) ? (void)(0) : _CPLAssert(#expr,__FILE__,__LINE__)) 87 # define CPLAssert(expr) 96 # define VALIDATE_POINTER_ERR CE_Fatal 98 # define VALIDATE_POINTER_ERR CE_Failure 101 #define VALIDATE_POINTER0(ptr, func) \ 102 do { if( NULL == ptr ) \ 104 CPLErr const ret = VALIDATE_POINTER_ERR; \ 105 CPLError( ret, CPLE_ObjectNull, \ 106 "Pointer \'%s\' is NULL in \'%s\'.\n", #ptr, (func)); \ 109 #define VALIDATE_POINTER1(ptr, func, rc) \ 110 do { if( NULL == ptr ) \ 112 CPLErr const ret = VALIDATE_POINTER_ERR; \ 113 CPLError( ret, CPLE_ObjectNull, \ 114 "Pointer \'%s\' is NULL in \'%s\'.\n", #ptr, (func)); \ 115 return (rc); }} while(0) 122 #define CPLE_AppDefined 1 123 #define CPLE_OutOfMemory 2 124 #define CPLE_FileIO 3 125 #define CPLE_OpenFailed 4 126 #define CPLE_IllegalArg 5 127 #define CPLE_NotSupported 6 128 #define CPLE_AssertionFailed 7 129 #define CPLE_NoWriteAccess 8 130 #define CPLE_UserInterrupt 9 131 #define CPLE_ObjectNull 10 void CPL_DLL CPLEmergencyError(const char *)
Definition: cpl_error.cpp:306
CPLErr CPL_DLL CPL_STDCALL CPLGetLastErrorType(void)
Definition: cpl_error.cpp:591
void CPL_DLL CPL_STDCALL CPLPushErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:896
const char CPL_DLL *CPL_STDCALL CPLGetLastErrorMsg(void)
Definition: cpl_error.cpp:613
void CPL_DLL *CPL_STDCALL CPLGetErrorHandlerUserData(void)
Definition: cpl_error.cpp:116
CPLErrorHandler CPL_DLL CPL_STDCALL CPLSetErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:875
void CPL_DLL CPL_STDCALL void CPL_DLL CPL_STDCALL _CPLAssert(const char *, const char *, int)
Definition: cpl_error.cpp:979
CPLErrorHandler CPL_DLL CPL_STDCALL CPLSetErrorHandlerEx(CPLErrorHandler, void *)
Definition: cpl_error.cpp:801
void CPL_DLL CPLErrorSetState(CPLErr eErrClass, int err_no, const char *pszMsg)
Definition: cpl_error.cpp:546
void CPL_DLL CPL_STDCALL CPLPushErrorHandlerEx(CPLErrorHandler, void *)
Definition: cpl_error.cpp:920
void CPL_DLL CPL_STDCALL CPLErrorReset(void)
Definition: cpl_error.cpp:524
void CPL_DLL CPL_STDCALL CPLPopErrorHandler(void)
Definition: cpl_error.cpp:947
int CPL_DLL CPL_STDCALL CPLGetLastErrorNo(void)
Definition: cpl_error.cpp:570