error.h file
Defines error macros and default error strings. This file is always included through diplib.h. See Error management.
Classes
-
class dip::
AssertionError - Exception class indicating that an internal inconsistency was found (the library code is wrong). more...
-
class dip::
Error - Base exception class. All exceptions thrown in DIPlib are derived of this class. more...
-
class dip::
ParameterError - Exception class indicating that a function received an inconsistent or out of range parameter (the calling code is wrong). more...
-
class dip::
RunTimeError - Exception class indicating that something happened that we couldn’t predict (e.g. file error). more...
Macros
- #define DIP_ADD_STACK_TRACE(error)
- Adds information from current function (including source file and location within file) to the
dip::Error. more... - #define DIP_ASSERT(test)
- Test a condition, throw a
dip::AssertionErrorif the condition is not met. more... - #define DIP_END_STACK_TRACE
- Ends a try/catch block that builds a stack trace when an exception is thrown. See
DIP_START_STACK_TRACE. - #define DIP_PARALLEL_ERROR_DECLARE
- Declarations needed before an OpenMP parallel section to catch exceptions. more...
- #define DIP_PARALLEL_ERROR_END
- Ends a try/catch block started by
DIP_PARALLEL_ERROR_START. SeeDIP_PARALLEL_ERROR_DECLAREfor details. - #define DIP_PARALLEL_ERROR_START
- Starts a try/catch block. Do not use without a
DIP_PARALLEL_ERROR_END. SeeDIP_PARALLEL_ERROR_DECLAREfor details. - #define DIP_STACK_TRACE_THIS
- Encapsulates a statement in a try/catch block that builds a stack trace when an exception is thrown. more...
- #define DIP_START_STACK_TRACE
- Starts a try/catch block that builds a stack trace when an exception is thrown. more...
- #define DIP_THROW(str)
- Throw a
dip::ParameterError. - #define DIP_THROW_ASSERTION(str)
- Throw a
dip::AssertionError. - #define DIP_THROW_IF(str)
- Test a condition, throw a
dip::ParameterErrorif the condition is met. - #define DIP_THROW_INVALID_FLAG(str)
- Throw a
dip::ParameterErrorthat reads “Invalid flag:“. - #define DIP_THROW_RUNTIME(str)
- Throw a
dip::RunTimeError.