Go to the documentation of this file.
42 #ifndef _CXCORE_ERROR_H_
43 #define _CXCORE_ERROR_H_
53 #define CV_StsBackTrace -1
54 #define CV_StsError -2
55 #define CV_StsInternal -3
56 #define CV_StsNoMem -4
57 #define CV_StsBadArg -5
58 #define CV_StsBadFunc -6
59 #define CV_StsNoConv -7
60 #define CV_StsAutoTrace -8
62 #define CV_HeaderIsNull -9
63 #define CV_BadImageSize -10
64 #define CV_BadOffset -11
65 #define CV_BadDataPtr -12
66 #define CV_BadStep -13
67 #define CV_BadModelOrChSeq -14
68 #define CV_BadNumChannels -15
69 #define CV_BadNumChannel1U -16
70 #define CV_BadDepth -17
71 #define CV_BadAlphaChannel -18
72 #define CV_BadOrder -19
73 #define CV_BadOrigin -20
74 #define CV_BadAlign -21
75 #define CV_BadCallBack -22
76 #define CV_BadTileSize -23
78 #define CV_BadROISize -25
80 #define CV_MaskIsTiled -26
82 #define CV_StsNullPtr -27
83 #define CV_StsVecLengthErr -28
84 #define CV_StsFilterStructContentErr -29
85 #define CV_StsKernelStructContentErr -30
86 #define CV_StsFilterOffsetErr -31
89 #define CV_StsBadSize -201
90 #define CV_StsDivByZero -202
91 #define CV_StsInplaceNotSupported -203
92 #define CV_StsObjectNotFound -204
93 #define CV_StsUnmatchedFormats -205
94 #define CV_StsBadFlag -206
95 #define CV_StsBadPoint -207
96 #define CV_StsBadMask -208
97 #define CV_StsUnmatchedSizes -209
98 #define CV_StsUnsupportedFormat -210
99 #define CV_StsOutOfRange -211
100 #define CV_StsParseError -212
101 #define CV_StsNotImplemented -213
102 #define CV_StsBadMemBlock -214
106 #define OPENCV_ERROR(status,func,context) \
107 cvError((status),(func),(context),__FILE__,__LINE__)
109 #define OPENCV_ERRCHK(func,context) \
110 {if (cvGetErrStatus() >= 0) \
111 {OPENCV_ERROR(CV_StsBackTrace,(func),(context));}}
113 #define OPENCV_ASSERT(expr,func,context) \
115 {OPENCV_ERROR(CV_StsInternal,(func),(context));}}
117 #define OPENCV_RSTERR() (cvSetErrStatus(CV_StsOk))
119 #define OPENCV_CALL( Func ) \
128 #ifdef CV_NO_FUNC_NAMES
129 #define CV_FUNCNAME( Name )
130 #define cvFuncName ""
132 #define CV_FUNCNAME( Name ) \
133 static char cvFuncName[] = Name
141 #define CV_ERROR( Code, Msg ) \
143 cvError( (Code), cvFuncName, Msg, __FILE__, __LINE__ ); \
148 #define CV_ERROR_FROM_CODE( code ) \
158 if( cvGetErrStatus() < 0 ) \
159 CV_ERROR( CV_StsBackTrace, "Inner function failed." ); \
168 #define CV_CALL( Func ) \
176 #define CV_ASSERT( Condition ) \
179 CV_ERROR( CV_StsInternal, "Assertion: " #Condition " failed" ); \
183 #define __END__ goto exit; exit: ; }
185 #define EXIT goto exit