36 using peak::common::Exception::Exception;
71 using Exception::Exception;
84 ,
peak::
common::InvalidParameterException(what)
90 ,
peak::
common::InvalidParameterException(what)
96 ,
peak::
common::InvalidParameterException(other)
139 using Exception::Exception;
174 using Exception::Exception;
183 using Exception::Exception;
218 using Exception::Exception;
223 std::string entryString;
228 entryString =
"PEAK_IPL_RETURN_CODE_SUCCESS";
232 entryString =
"PEAK_IPL_RETURN_CODE_ERROR";
236 entryString =
"PEAK_IPL_RETURN_CODE_BUFFER_TOO_SMALL";
240 entryString =
"PEAK_IPL_RETURN_CODE_INVALID_ARGUMENT";
244 entryString =
"PEAK_IPL_RETURN_CODE_INVALID_HANDLE";
248 entryString =
"PEAK_IPL_RETURN_CODE_OUT_OF_RANGE";
252 entryString =
"PEAK_IPL_RETURN_CODE_IMAGE_FORMAT_NOT_SUPPORTED";
256 entryString =
"PEAK_IPL_RETURN_CODE_IO_ERROR";
260 entryString =
"PEAK_IPL_RETURN_CODE_BUSY";
264 entryString =
"PEAK_IPL_RETURN_CODE_TIMEOUT";
268 entryString =
"PEAK_IPL_RETURN_CODE_FORMAT_INTERPRETATION_ERROR";
272 entryString =
"PEAK_IPL_RETURN_CODE_NOT_SUPPORTED";
276 entryString =
"PEAK_IPL_RETURN_CODE_NOT_PERMITTED";
283template <
class CallableType>
289 size_t lastErrorDescriptionSize = 0;
293 throw Exception(
"Could not query the last error!");
295 std::vector<char> lastErrorDescription(lastErrorDescriptionSize);
297 &lastErrorCode, lastErrorDescription.data(), &lastErrorDescriptionSize)
300 throw Exception(
"Could not query the last error!");
303 std::stringstream errorText;
304 errorText <<
"[Error-Code: " << lastErrorCode <<
" ("
306 <<
") | Error-Description: " << lastErrorDescription.data() <<
"]";
308 switch (lastErrorCode)
331 throw Exception(errorText.str().c_str());
Base class for all exceptions thrown by the library.
Definition peak_common_exceptions.hpp:31
Thrown when an input, output, file or device communication error occurs.
Definition peak_common_exceptions.hpp:140
Thrown when a function receives an invalid parameter.
Definition peak_common_exceptions.hpp:53
Thrown when an unsupported operation or feature is used.
Definition peak_common_exceptions.hpp:153
Thrown when a parameter is outside the valid range.
Definition peak_common_exceptions.hpp:114
Thrown when an operation exceeds its time limit.
Definition peak_common_exceptions.hpp:127
The exception thrown when a given buffer is too small for the data.
Definition peak_ipl_exception.hpp:70
The exception thrown when the resource is busy.
Definition peak_ipl_exception.hpp:173
The base class for all exceptions thrown by the library.
Definition peak_ipl_exception.hpp:35
The exception that is thrown when an image input or output operation fails.
Definition peak_ipl_exception.hpp:147
IOException(const std::string &what)
Definition peak_ipl_exception.hpp:149
IOException(const char *what)
Definition peak_ipl_exception.hpp:155
IOException(const IOException &other)
Definition peak_ipl_exception.hpp:161
The exception thrown when passing an invalid parameter to a function.
Definition peak_ipl_exception.hpp:79
InvalidArgumentException(const std::string &what)
Definition peak_ipl_exception.hpp:81
InvalidArgumentException(const char *what)
Definition peak_ipl_exception.hpp:87
InvalidArgumentException(const InvalidArgumentException &other)
Definition peak_ipl_exception.hpp:93
The exception thrown when passing an invalid handle to a function.
Definition peak_ipl_exception.hpp:217
The exception thrown when the operation is not permitted.
Definition peak_ipl_exception.hpp:182
The exception thrown for trying to access a value being out of range.
Definition peak_ipl_exception.hpp:44
OutOfRangeException(const char *what)
Definition peak_ipl_exception.hpp:52
OutOfRangeException(const OutOfRangeException &other)
Definition peak_ipl_exception.hpp:58
OutOfRangeException(const std::string &what)
Definition peak_ipl_exception.hpp:46
The exception thrown when the operation times out.
Definition peak_ipl_exception.hpp:191
TimeoutException(const TimeoutException &other)
Definition peak_ipl_exception.hpp:205
TimeoutException(const char *what)
Definition peak_ipl_exception.hpp:199
TimeoutException(const std::string &what)
Definition peak_ipl_exception.hpp:193
Root namespace for common types and interfaces shared across multiple libraries.
Definition peak_common_math.hpp:17
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:221
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition peak_ipl_exception.hpp:284
int32_t PEAK_IPL_RETURN_CODE
Definition peak_ipl_backend.h:43
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:27
@ PEAK_IPL_RETURN_CODE_SUCCESS
Definition peak_ipl_backend.h:28
@ PEAK_IPL_RETURN_CODE_OUT_OF_RANGE
Definition peak_ipl_backend.h:34
@ PEAK_IPL_RETURN_CODE_IO_ERROR
Definition peak_ipl_backend.h:31
@ PEAK_IPL_RETURN_CODE_FORMAT_INTERPRETATION_ERROR
Definition peak_ipl_backend.h:36
@ PEAK_IPL_RETURN_CODE_INVALID_HANDLE
Definition peak_ipl_backend.h:30
@ PEAK_IPL_RETURN_CODE_INVALID_ARGUMENT
Definition peak_ipl_backend.h:33
@ PEAK_IPL_RETURN_CODE_BUFFER_TOO_SMALL
Definition peak_ipl_backend.h:32
@ PEAK_IPL_RETURN_CODE_ERROR
Definition peak_ipl_backend.h:29
@ PEAK_IPL_RETURN_CODE_NOT_PERMITTED
Definition peak_ipl_backend.h:38
@ PEAK_IPL_RETURN_CODE_BUSY
Definition peak_ipl_backend.h:39
@ PEAK_IPL_RETURN_CODE_IMAGE_FORMAT_NOT_SUPPORTED
Definition peak_ipl_backend.h:35
@ PEAK_IPL_RETURN_CODE_TIMEOUT
Definition peak_ipl_backend.h:40
@ PEAK_IPL_RETURN_CODE_NOT_SUPPORTED
Definition peak_ipl_backend.h:37
#define PEAK_IPL_C_ABI_PREFIX
Definition peak_ipl_dll_defines.h:11