36 using std::runtime_error::runtime_error;
44 using Exception::Exception;
52 using Exception::Exception;
60 using Exception::Exception;
68 using Exception::Exception;
76 using Exception::Exception;
84 using Exception::Exception;
92 using Exception::Exception;
100 using Exception::Exception;
108 using Exception::Exception;
116 using Exception::Exception;
121 std::string entryString;
126 entryString =
"PEAK_IPL_RETURN_CODE_SUCCESS";
130 entryString =
"PEAK_IPL_RETURN_CODE_ERROR";
134 entryString =
"PEAK_IPL_RETURN_CODE_BUFFER_TOO_SMALL";
138 entryString =
"PEAK_IPL_RETURN_CODE_INVALID_ARGUMENT";
142 entryString =
"PEAK_IPL_RETURN_CODE_INVALID_HANDLE";
146 entryString =
"PEAK_IPL_RETURN_CODE_OUT_OF_RANGE";
150 entryString =
"PEAK_IPL_RETURN_CODE_IMAGE_FORMAT_NOT_SUPPORTED";
154 entryString =
"PEAK_IPL_RETURN_CODE_IO_ERROR";
158 entryString =
"limgTypeRETURN_CODE_BUSY";
162 entryString =
"limgTypeRETURN_CODE_TIMEOUT";
166 entryString =
"PEAK_IPL_RETURN_CODE_FORMAT_INTERPRETATION_ERROR";
170 entryString =
"limgTypeRETURN_CODE_NOT_SUPPORTED";
174 entryString =
"limgTypeRETURN_CODE_NOT_PERMITTED";
181 template <
class CallableType>
187 size_t lastErrorDescriptionSize = 0;
191 throw Exception(
"Could not query the last error!");
193 std::vector<char> lastErrorDescription(lastErrorDescriptionSize);
195 &lastErrorCode, lastErrorDescription.data(), &lastErrorDescriptionSize)
198 throw Exception(
"Could not query the last error!");
201 std::stringstream errorText;
202 errorText <<
"[Error-Code: " << lastErrorCode <<
" (" 204 <<
") | Error-Description: " << lastErrorDescription.data() <<
"]";
206 switch (lastErrorCode)
229 throw Exception(errorText.str().c_str());
The exception thrown when the operation not permitted.
Definition: peak_ipl_exception.hpp:98
Definition: peak_ipl_backend.h:33
Definition: peak_ipl_backend.h:39
PEAK_IPL_C_API PEAK_IPL_Library_GetLastError(PEAK_IPL_RETURN_CODE *lastErrorCode, char *lastErrorDescription, size_t *lastErrorDescriptionSize)
Queries the last error.
#define PEAK_IPL_C_ABI_PREFIX
Definition: peak_ipl_dll_defines.h:16
The exception thrown when the operation times out.
Definition: peak_ipl_exception.hpp:106
The base class for all exceptions thrown by the library.
Definition: peak_ipl_exception.hpp:34
Definition: peak_ipl_backend.h:37
int32_t PEAK_IPL_RETURN_CODE
Definition: peak_ipl_backend.h:45
The "peak::ipl" namespace contains the whole image processing library.
Definition: peak_ipl_binning.hpp:22
Definition: peak_ipl_backend.h:35
The exception thrown when an given image format can not be used on this data e.g. during reading from...
Definition: peak_ipl_exception.hpp:82
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition: peak_ipl_exception.hpp:182
Definition: peak_ipl_backend.h:42
Definition: peak_ipl_backend.h:36
The exception thrown when passing an invalid parameter to a function.
Definition: peak_ipl_exception.hpp:58
Definition: peak_ipl_backend.h:34
The exception thrown for trying to access a value being out of range.
Definition: peak_ipl_exception.hpp:42
The exception thrown when an given buffer is to small for for the data.
Definition: peak_ipl_exception.hpp:50
Definition: peak_ipl_backend.h:30
std::string StringFromPEAK_IPL_RETURN_CODE(PEAK_IPL_RETURN_CODE_t entry)
Definition: peak_ipl_exception.hpp:119
Definition: peak_ipl_backend.h:41
Definition: peak_ipl_backend.h:32
Definition: peak_ipl_backend.h:38
Definition: peak_ipl_backend.h:31
Definition: peak_ipl_backend.h:40
PEAK_IPL_RETURN_CODE_t
Definition: peak_ipl_backend.h:28
The exception thrown when resource busy.
Definition: peak_ipl_exception.hpp:90
The exception thrown when passing an invalid handle to a function.
Definition: peak_ipl_exception.hpp:114