13 #ifndef mitkException_h
14 #define mitkException_h
62 Exception(
const char *file,
unsigned int lineNumber = 0,
const char *desc =
"None",
const char *loc =
"Unknown")
63 :
itk::ExceptionObject(file, lineNumber, desc, loc)
83 void AddRethrowData(
const char *file,
unsigned int lineNumber,
const char *message);
104 void GetRethrowData(
int rethrowNumber, std::string &file,
int &line, std::string &message);
115 std::stringstream ss;
116 ss << this->GetDescription() << data;
117 this->SetDescription(ss.str());
130 std::stringstream ss;
131 ss << this->GetDescription() << data;
132 this->SetDescription(ss.str());
143 std::stringstream ss;
144 ss << this->GetDescription() << func;
145 this->SetDescription(ss.str());
Base class for all MITK exceptions.
std::vector< ReThrowData > m_RethrowData
List of recorded rethrow contexts.
void AddRethrowData(const char *file, unsigned int lineNumber, const char *message)
Record additional rethrow context for this exception.
Exception & operator<<(std::ostream &(*func)(std::ostream &))
Append a stream manipulator (e.g. std::endl) to the exception description.
Exception(const char *file, unsigned int lineNumber=0, const char *desc="None", const char *loc="Unknown")
Construct an exception with source location and description.
Exception & operator<<(const T &data)
Append data to the exception description via the stream operator.
int GetNumberOfRethrows()
Return the number of times this exception has been rethrown.
~Exception() override
Destructor.
void GetRethrowData(int rethrowNumber, std::string &file, int &line, std::string &message)
Retrieve the rethrow context for a specific rethrow.
Exception & operator<<(T &data)
Append non-const data to the exception description via the stream operator.
Find image slices visible on a given plane.
MITKCORE_EXPORT std::ostream & operator<<(std::ostream &o, DataNode::Pointer &dtn)
Stream output operator for DataNode smart pointers.
Internal storage for a single rethrow record.
std::string RethrowClassname
Source file of the rethrow.
std::string RethrowMessage
Message associated with the rethrow.
unsigned int RethrowLine
Line number of the rethrow.