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 CPLCleanupErrorMutex(
void );
67 typedef
void (CPL_STDCALL *CPLErrorHandler)(CPLErr,
int, const
char*);
69 void CPL_DLL CPL_STDCALL CPLLoggingErrorHandler( CPLErr,
int, const
char * );
70 void CPL_DLL CPL_STDCALL CPLDefaultErrorHandler( CPLErr,
int, const
char * );
71 void CPL_DLL CPL_STDCALL CPLQuietErrorHandler( CPLErr,
int, const
char * );
72 void CPLTurnFailureIntoWarning(
int bOn );
80 void CPL_DLL CPL_STDCALL
CPLDebug( const
char *, const
char *, ... ) CPL_PRINT_FUNC_FORMAT (2, 3);
81 void CPL_DLL CPL_STDCALL
_CPLAssert( const
char *, const
char *,
int );
84 # define CPLAssert(expr) ((expr) ? (void)(0) : _CPLAssert(#expr,__FILE__,__LINE__)) 86 # define CPLAssert(expr) 95 # define VALIDATE_POINTER_ERR CE_Fatal 97 # define VALIDATE_POINTER_ERR CE_Failure 100 #define VALIDATE_POINTER0(ptr, func) \ 101 do { if( NULL == ptr ) \ 103 CPLErr const ret = VALIDATE_POINTER_ERR; \ 104 CPLError( ret, CPLE_ObjectNull, \ 105 "Pointer \'%s\' is NULL in \'%s\'.\n", #ptr, (func)); \ 108 #define VALIDATE_POINTER1(ptr, func, rc) \ 109 do { if( NULL == ptr ) \ 111 CPLErr const ret = VALIDATE_POINTER_ERR; \ 112 CPLError( ret, CPLE_ObjectNull, \ 113 "Pointer \'%s\' is NULL in \'%s\'.\n", #ptr, (func)); \ 114 return (rc); }} while(0) 121 #define CPLE_AppDefined 1 122 #define CPLE_OutOfMemory 2 123 #define CPLE_FileIO 3 124 #define CPLE_OpenFailed 4 125 #define CPLE_IllegalArg 5 126 #define CPLE_NotSupported 6 127 #define CPLE_AssertionFailed 7 128 #define CPLE_NoWriteAccess 8 129 #define CPLE_UserInterrupt 9 130 #define CPLE_ObjectNull 10 void CPLPushErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:841
CPLErr CPLGetLastErrorType(void)
Definition: cpl_error.cpp:539
void _CPLAssert(const char *, const char *, int)
Definition: cpl_error.cpp:924
const char * CPLGetLastErrorMsg(void)
Definition: cpl_error.cpp:561
CPLErrorHandler CPLSetErrorHandlerEx(CPLErrorHandler, void *)
Definition: cpl_error.cpp:746
void CPLPopErrorHandler(void)
Definition: cpl_error.cpp:892
void CPLDebug(const char *, const char *,...)
Definition: cpl_error.cpp:377
void CPLErrorReset(void)
Definition: cpl_error.cpp:494
void CPLEmergencyError(const char *)
Definition: cpl_error.cpp:289
void * CPLGetErrorHandlerUserData(void)
Definition: cpl_error.cpp:115
CPLErrorHandler CPLSetErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:820
void CPLPushErrorHandlerEx(CPLErrorHandler, void *)
Definition: cpl_error.cpp:865
int CPLGetLastErrorNo(void)
Definition: cpl_error.cpp:518
void CPLError(CPLErr eErrClass, int err_no, const char *fmt,...)
Definition: cpl_error.cpp:157