41 using peak::common::Exception::Exception;
76 using Exception::Exception;
89 ,
peak::
common::InvalidParameterException(what)
95 ,
peak::
common::InvalidParameterException(what)
101 ,
peak::
common::InvalidParameterException(other)
137 using Exception::Exception;
172 using Exception::Exception;
181 using Exception::Exception;
216 using Exception::Exception;
221 std::string entryString;
226 entryString =
"PEAK_IPL_RETURN_CODE_SUCCESS";
230 entryString =
"PEAK_IPL_RETURN_CODE_ERROR";
234 entryString =
"PEAK_IPL_RETURN_CODE_BUFFER_TOO_SMALL";
238 entryString =
"PEAK_IPL_RETURN_CODE_INVALID_ARGUMENT";
242 entryString =
"PEAK_IPL_RETURN_CODE_INVALID_HANDLE";
246 entryString =
"PEAK_IPL_RETURN_CODE_OUT_OF_RANGE";
250 entryString =
"PEAK_IPL_RETURN_CODE_IMAGE_FORMAT_NOT_SUPPORTED";
254 entryString =
"PEAK_IPL_RETURN_CODE_IO_ERROR";
258 entryString =
"PEAK_IPL_RETURN_CODE_BUSY";
262 entryString =
"PEAK_IPL_RETURN_CODE_TIMEOUT";
266 entryString =
"PEAK_IPL_RETURN_CODE_FORMAT_INTERPRETATION_ERROR";
270 entryString =
"PEAK_IPL_RETURN_CODE_NOT_SUPPORTED";
274 entryString =
"PEAK_IPL_RETURN_CODE_NOT_PERMITTED";
281template <
class CallableType>
287 size_t lastErrorDescriptionSize = 0;
291 throw Exception(
"Could not query the last error!");
293 std::vector<char> lastErrorDescription(lastErrorDescriptionSize);
295 &lastErrorCode, lastErrorDescription.data(), &lastErrorDescriptionSize)
298 throw Exception(
"Could not query the last error!");
301 std::stringstream errorText;
302 errorText <<
"[Error-Code: " << lastErrorCode <<
" ("
304 <<
") | Error-Description: " << lastErrorDescription.data() <<
"]";
306 switch (lastErrorCode)
329 throw Exception(errorText.str().c_str());
Base class for all exceptions thrown by the library.
Definition peak_common_exceptions.hpp:36
Thrown when an input, output, file or device communication error occurs.
Definition peak_common_exceptions.hpp:136
Thrown when a function receives an invalid parameter.
Definition peak_common_exceptions.hpp:49
Thrown when an unsupported operation or feature is used.
Definition peak_common_exceptions.hpp:149
Thrown when a parameter is outside the valid range.
Definition peak_common_exceptions.hpp:110
Thrown when an operation exceeds its time limit.
Definition peak_common_exceptions.hpp:123
The exception thrown when a given buffer is too small for the data.
Definition peak_ipl_exception.hpp:75
The exception thrown when the resource busy.
Definition peak_ipl_exception.hpp:171
The base class for all exceptions thrown by the library.
Definition peak_ipl_exception.hpp:40
The exception thrown when a given image format can't be used on this data, e.g. during reading from f...
Definition peak_ipl_exception.hpp:145
IOException(const std::string &what)
Definition peak_ipl_exception.hpp:147
IOException(const char *what)
Definition peak_ipl_exception.hpp:153
IOException(const IOException &other)
Definition peak_ipl_exception.hpp:159
The exception thrown when passing an invalid parameter to a function.
Definition peak_ipl_exception.hpp:84
InvalidArgumentException(const std::string &what)
Definition peak_ipl_exception.hpp:86
InvalidArgumentException(const char *what)
Definition peak_ipl_exception.hpp:92
InvalidArgumentException(const InvalidArgumentException &other)
Definition peak_ipl_exception.hpp:98
The exception thrown when passing an invalid handle to a function.
Definition peak_ipl_exception.hpp:215
The exception thrown when the operation not permitted.
Definition peak_ipl_exception.hpp:180
The exception thrown for trying to access a value being out of range.
Definition peak_ipl_exception.hpp:49
OutOfRangeException(const char *what)
Definition peak_ipl_exception.hpp:57
OutOfRangeException(const OutOfRangeException &other)
Definition peak_ipl_exception.hpp:63
OutOfRangeException(const std::string &what)
Definition peak_ipl_exception.hpp:51
The exception thrown when the operation times out.
Definition peak_ipl_exception.hpp:189
TimeoutException(const TimeoutException &other)
Definition peak_ipl_exception.hpp:203
TimeoutException(const char *what)
Definition peak_ipl_exception.hpp:197
TimeoutException(const std::string &what)
Definition peak_ipl_exception.hpp:191
Root namespace for common types and interfaces shared across multiple libraries.
Definition peak_common_math.hpp:22
The "peak::ipl" namespace contains the whole image processing library.
std::string StringFromPEAK_IPL_RETURN_CODE(PEAK_IPL_RETURN_CODE_t entry)
Definition peak_ipl_exception.hpp:219
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition peak_ipl_exception.hpp:282
int32_t PEAK_IPL_RETURN_CODE
Definition peak_ipl_backend.h:46
PEAK_IPL_C_API PEAK_IPL_Library_GetLastError(PEAK_IPL_RETURN_CODE *lastErrorCode, char *lastErrorDescription, size_t *lastErrorDescriptionSize)
Queries the last error.
PEAK_IPL_RETURN_CODE_t
Definition peak_ipl_backend.h:30
@ PEAK_IPL_RETURN_CODE_SUCCESS
Definition peak_ipl_backend.h:31
@ PEAK_IPL_RETURN_CODE_OUT_OF_RANGE
Definition peak_ipl_backend.h:37
@ PEAK_IPL_RETURN_CODE_IO_ERROR
Definition peak_ipl_backend.h:34
@ PEAK_IPL_RETURN_CODE_FORMAT_INTERPRETATION_ERROR
Definition peak_ipl_backend.h:39
@ PEAK_IPL_RETURN_CODE_INVALID_HANDLE
Definition peak_ipl_backend.h:33
@ PEAK_IPL_RETURN_CODE_INVALID_ARGUMENT
Definition peak_ipl_backend.h:36
@ PEAK_IPL_RETURN_CODE_BUFFER_TOO_SMALL
Definition peak_ipl_backend.h:35
@ PEAK_IPL_RETURN_CODE_ERROR
Definition peak_ipl_backend.h:32
@ PEAK_IPL_RETURN_CODE_NOT_PERMITTED
Definition peak_ipl_backend.h:41
@ PEAK_IPL_RETURN_CODE_BUSY
Definition peak_ipl_backend.h:42
@ PEAK_IPL_RETURN_CODE_IMAGE_FORMAT_NOT_SUPPORTED
Definition peak_ipl_backend.h:38
@ PEAK_IPL_RETURN_CODE_TIMEOUT
Definition peak_ipl_backend.h:43
@ PEAK_IPL_RETURN_CODE_NOT_SUPPORTED
Definition peak_ipl_backend.h:40
#define PEAK_IPL_C_ABI_PREFIX
Definition peak_ipl_dll_defines.h:16