|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Go to the source code of this file.
Macros | |
| #define | mitkThrow() |
| Throw a generic mitk::Exception with source location information. More... | |
| #define | mitkReThrow(mitkexception) |
| Rethrow an existing mitk::Exception while recording rethrow context. More... | |
| #define | mitkThrowException(classname) |
| Throw a specialized exception derived from mitk::Exception. More... | |
| #define | mitkExceptionClassMacro(ClassName, SuperClassName) |
| Convenience macro for defining MITK exception subclasses. More... | |
| #define mitkExceptionClassMacro | ( | ClassName, | |
| SuperClassName | |||
| ) |
Convenience macro for defining MITK exception subclasses.
Generates a constructor compatible with the exception macros and provides stream operators and ITK RTTI support. All MITK exception classes should derive from mitk::Exception and use this macro in their public section.
| ClassName | Name of the new exception class. |
| SuperClassName | Name of the parent exception class (typically mitk::Exception). |
Definition at line 88 of file mitkExceptionMacro.h.
| #define mitkReThrow | ( | mitkexception | ) |
Rethrow an existing mitk::Exception while recording rethrow context.
The file and line of the rethrow site are stored in the exception so that the full rethrow chain can be inspected via mitk::Exception::GetNumberOfRethrows() and mitk::Exception::GetRethrowData().
Example:
| mitkexception | The mitk::Exception (or derived) object to rethrow. |
Definition at line 56 of file mitkExceptionMacro.h.
| #define mitkThrow | ( | ) |
Throw a generic mitk::Exception with source location information.
Use the stream operator to append a human-readable message:
Definition at line 31 of file mitkExceptionMacro.h.
| #define mitkThrowException | ( | classname | ) |
Throw a specialized exception derived from mitk::Exception.
The classname must be a class that inherits from mitk::Exception and uses the mitkExceptionClassMacro in its definition. Use the stream operator to append an error message:
| classname | Fully qualified class name of the exception to throw. |
Definition at line 74 of file mitkExceptionMacro.h.