An object of this class represents an exception of MITK. Please don't instantiate exceptions manually, but use the exception macros (file mitkExceptionMacro.h) instead. Simple use in your code is:
More...
|
| Exception (const char *file, unsigned int lineNumber=0, const char *desc="None", const char *loc="Unknown") |
|
| ~Exception () override throw () |
|
virtual const char * | GetClassName () const |
|
void | AddRethrowData (const char *file, unsigned int lineNumber, const char *message) |
| Adds rethrow data to this exception. More...
|
|
int | GetNumberOfRethrows () |
|
void | GetRethrowData (int rethrowNumber, std::string &file, int &line, std::string &message) |
|
template<class T > |
Exception & | operator<< (const T &data) |
| Definition of the bit shift operator for this class. More...
|
|
template<class T > |
Exception & | operator<< (T &data) |
| Definition of the bit shift operator for this class (for non const data). More...
|
|
Exception & | operator<< (std::ostream &(*func)(std::ostream &)) |
| Definition of the bit shift operator for this class (for functions). More...
|
|
An object of this class represents an exception of MITK. Please don't instantiate exceptions manually, but use the exception macros (file mitkExceptionMacro.h) instead. Simple use in your code is:
Documentation
mitkThrow() << "optional exception message";
You can also define specialized exceptions which must inherit from this class. Please always use the mitkExceptionClassMacro when implementing specialized exceptions. A simple implementation can look like:
class MyException : public mitk::Exception { public: mitkExceptionClassMacro(MyException,mitk::Exception); };
You can then throw your specialized exceptions by using the macro
mitkThrowException(MyException) << "optional exception message";
Definition at line 45 of file mitkException.h.