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)
144 using Exception::Exception;
179 using Exception::Exception;
188 using Exception::Exception;
223 using Exception::Exception;
228 std::string entryString;
233 entryString =
"PEAK_IPL_RETURN_CODE_SUCCESS";
237 entryString =
"PEAK_IPL_RETURN_CODE_ERROR";
241 entryString =
"PEAK_IPL_RETURN_CODE_BUFFER_TOO_SMALL";
245 entryString =
"PEAK_IPL_RETURN_CODE_INVALID_ARGUMENT";
249 entryString =
"PEAK_IPL_RETURN_CODE_INVALID_HANDLE";
253 entryString =
"PEAK_IPL_RETURN_CODE_OUT_OF_RANGE";
257 entryString =
"PEAK_IPL_RETURN_CODE_IMAGE_FORMAT_NOT_SUPPORTED";
261 entryString =
"PEAK_IPL_RETURN_CODE_IO_ERROR";
265 entryString =
"PEAK_IPL_RETURN_CODE_BUSY";
269 entryString =
"PEAK_IPL_RETURN_CODE_TIMEOUT";
273 entryString =
"PEAK_IPL_RETURN_CODE_FORMAT_INTERPRETATION_ERROR";
277 entryString =
"PEAK_IPL_RETURN_CODE_NOT_SUPPORTED";
281 entryString =
"PEAK_IPL_RETURN_CODE_NOT_PERMITTED";
288template <
class CallableType>
294 size_t lastErrorDescriptionSize = 0;
298 throw Exception(
"Could not query the last error!");
300 std::vector<char> lastErrorDescription(lastErrorDescriptionSize);
302 &lastErrorCode, lastErrorDescription.data(), &lastErrorDescriptionSize)
305 throw Exception(
"Could not query the last error!");
308 std::stringstream errorText;
309 errorText <<
"[Error-Code: " << lastErrorCode <<
" ("
311 <<
") | Error-Description: " << lastErrorDescription.data() <<
"]";
313 switch (lastErrorCode)
336 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:145
Thrown when a function receives an invalid parameter.
Definition peak_common_exceptions.hpp:58
Thrown when an unsupported operation or feature is used.
Definition peak_common_exceptions.hpp:158
Thrown when a parameter is outside the valid range.
Definition peak_common_exceptions.hpp:119
Thrown when an operation exceeds its time limit.
Definition peak_common_exceptions.hpp:132
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 is busy.
Definition peak_ipl_exception.hpp:178
The base class for all exceptions thrown by the library.
Definition peak_ipl_exception.hpp:40
The exception that is thrown when an image input or output operation fails.
Definition peak_ipl_exception.hpp:152
IOException(const std::string &what)
Definition peak_ipl_exception.hpp:154
IOException(const char *what)
Definition peak_ipl_exception.hpp:160
IOException(const IOException &other)
Definition peak_ipl_exception.hpp:166
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:222
The exception thrown when the operation is not permitted.
Definition peak_ipl_exception.hpp:187
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:196
TimeoutException(const TimeoutException &other)
Definition peak_ipl_exception.hpp:210
TimeoutException(const char *what)
Definition peak_ipl_exception.hpp:204
TimeoutException(const std::string &what)
Definition peak_ipl_exception.hpp:198
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:226
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition peak_ipl_exception.hpp:289
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