Go to the documentation of this file.
31 #ifndef CPL_ERROR_H_INCLUDED
32 #define CPL_ERROR_H_INCLUDED
65 #ifdef STRICT_CPLERRORNUM_TYPE
99 #define CPLE_AppDefined 1
101 #define CPLE_OutOfMemory 2
103 #define CPLE_FileIO 3
105 #define CPLE_OpenFailed 4
107 #define CPLE_IllegalArg 5
109 #define CPLE_NotSupported 6
111 #define CPLE_AssertionFailed 7
113 #define CPLE_NoWriteAccess 8
115 #define CPLE_UserInterrupt 9
117 #define CPLE_ObjectNull 10
123 #define CPLE_HttpResponse 11
125 #define CPLE_AWSBucketNotFound 12
127 #define CPLE_AWSObjectNotFound 13
129 #define CPLE_AWSAccessDenied 14
131 #define CPLE_AWSInvalidCredentials 15
133 #define CPLE_AWSSignatureDoesNotMatch 16
150 void CPL_DLL CPLCleanupErrorMutex(
void );
168 #ifdef WITHOUT_CPLDEBUG
169 #define CPLDebug(...)
171 void CPL_DLL CPL_STDCALL CPLDebug(
const char *,
CPL_FORMAT_STRING(
const char *), ...)
179 # define CPLAssert(expr) ((expr) ? (void)(0) : _CPLAssert(#expr,__FILE__,__LINE__))
182 # define CPLAssert(expr)
192 # define VALIDATE_POINTER_ERR CE_Fatal
194 # define VALIDATE_POINTER_ERR CE_Failure
198 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) && !defined(DOXYGEN_SKIP)
205 class CPLErrorHandlerPusher
218 ~CPLErrorHandlerPusher()
224 class CPLErrorStateBackuper
228 std::string m_osLastErrorMsg;
231 CPLErrorStateBackuper() :
237 ~CPLErrorStateBackuper()
240 m_osLastErrorMsg.c_str());
251 #define VALIDATE_POINTER0(ptr, func) \
252 do { if( CPL_NULLPTR == ptr ) \
254 CPLErr const ret = VALIDATE_POINTER_ERR; \
255 CPLError( ret, CPLE_ObjectNull, \
256 "Pointer \'%s\' is NULL in \'%s\'.\n", #ptr, (func)); \
260 #define VALIDATE_POINTER1(ptr, func, rc) \
261 do { if( CPL_NULLPTR == ptr ) \
263 CPLErr const ret = VALIDATE_POINTER_ERR; \
264 CPLError( ret, CPLE_ObjectNull, \
265 "Pointer \'%s\' is NULL in \'%s\'.\n", #ptr, (func)); \
266 return (rc); }} while(0)
#define CPL_PRINT_FUNC_FORMAT(format_idx, arg_idx)
Definition: cpl_port.h:904
#define CPLE_UserInterrupt
Definition: cpl_error.h:115
void CPL_DLL CPL_STDCALL CPLLoggingErrorHandler(CPLErr, CPLErrorNum, const char *)
Definition: cpl_error.cpp:963
void CPL_DLL *CPL_STDCALL CPLGetErrorHandlerUserData(void)
Definition: cpl_error.cpp:186
void CPL_DLL CPLEmergencyError(const char *) CPL_NO_RETURN
Definition: cpl_error.cpp:423
void CPL_DLL CPL_STDCALL CPLPushErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:1166
CPLErr CPL_DLL CPL_STDCALL CPLGetLastErrorType(void)
Definition: cpl_error.cpp:823
#define CPLE_NoWriteAccess
Definition: cpl_error.h:113
const char CPL_DLL *CPL_STDCALL CPLGetLastErrorMsg(void)
Definition: cpl_error.cpp:847
#define CPL_NO_RETURN
Definition: cpl_port.h:946
#define CPLE_AWSBucketNotFound
Definition: cpl_error.h:125
CPLErrorHandler CPL_DLL CPL_STDCALL CPLSetErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:1145
void(CPL_STDCALL * CPLErrorHandler)(CPLErr, CPLErrorNum, const char *)
Definition: cpl_error.h:154
#define CPLE_OutOfMemory
Definition: cpl_error.h:101
#define CPLE_ObjectNull
Definition: cpl_error.h:117
int CPLErrorNum
Definition: cpl_error.h:94
#define CPLE_OpenFailed
Definition: cpl_error.h:105
CPLErrorNum CPL_DLL CPL_STDCALL CPLGetLastErrorNo(void)
Definition: cpl_error.cpp:799
#define CPLE_HttpResponse
Definition: cpl_error.h:123
void CPL_DLL CPL_STDCALL CPLPopErrorHandler(void)
Definition: cpl_error.cpp:1223
#define CPLE_AWSSignatureDoesNotMatch
Definition: cpl_error.h:133
GUInt32 CPL_DLL CPL_STDCALL CPLGetErrorCounter(void)
Definition: cpl_error.cpp:870
#define CPLE_AWSObjectNotFound
Definition: cpl_error.h:127
void CPL_DLL CPL_STDCALL CPLQuietErrorHandler(CPLErr, CPLErrorNum, const char *)
Definition: cpl_error.cpp:948
#define CPLE_AssertionFailed
Definition: cpl_error.h:111
#define CPLE_NotSupported
Definition: cpl_error.h:109
CPLErrorHandler CPL_DLL CPL_STDCALL CPLSetErrorHandlerEx(CPLErrorHandler, void *)
Definition: cpl_error.cpp:1071
void CPL_DLL CPL_STDCALL CPLDefaultErrorHandler(CPLErr, CPLErrorNum, const char *)
Definition: cpl_error.cpp:884
#define CPL_FORMAT_STRING(arg)
Definition: cpl_port.h:919
void CPL_DLL void CPL_DLL CPLErrorV(CPLErr, CPLErrorNum, const char *, va_list)
Definition: cpl_error.cpp:248
void CPL_DLL CPL_STDCALL CPLPushErrorHandlerEx(CPLErrorHandler, void *)
Definition: cpl_error.cpp:1189
void CPL_DLL CPLErrorSetState(CPLErr eErrClass, CPLErrorNum err_no, const char *pszMsg)
Definition: cpl_error.cpp:745
void CPL_DLL CPL_STDCALL CPLSetCurrentErrorHandlerCatchDebug(int bCatchDebug)
Definition: cpl_error.cpp:1262
void CPL_DLL CPL_STDCALL CPLErrorReset(void)
Definition: cpl_error.cpp:710
#define CPLE_None
Definition: cpl_error.h:97
CPLErr
Definition: cpl_error.h:52
#define CPLE_AWSAccessDenied
Definition: cpl_error.h:129
#define CPLE_AWSInvalidCredentials
Definition: cpl_error.h:131
#define CPLE_IllegalArg
Definition: cpl_error.h:107
void CPL_DLL CPL_STDCALL void CPL_DLL CPL_STDCALL _CPLAssert(const char *, const char *, int) CPL_NO_RETURN
Definition: cpl_error.cpp:1296
#define CPLE_FileIO
Definition: cpl_error.h:103
void CPLTurnFailureIntoWarning(int bOn)
Definition: cpl_error.cpp:1039
#define CPLE_AppDefined
Definition: cpl_error.h:99
unsigned int GUInt32
Definition: cpl_port.h:205