#include <itkExceptionObject.h>
Inheritance diagram for itk::ExceptionObject:
Public Types | |
typedef std::exception | Superclass |
Public Methods | |
virtual | ~ExceptionObject () throw () |
ExceptionObject & | operator= (const ExceptionObject &orig) |
virtual const char * | GetNameOfClass () const |
virtual void | Print (std::ostream &os) const |
virtual const char * | GetFile () const |
virtual unsigned int | GetLine () const |
virtual const char * | what () const throw () |
ExceptionObject (const char *file="Unknown", unsigned int lineNumber=0, const char *desc="None", const char *loc="Unknown") | |
ExceptionObject (const std::string &file, unsigned int lineNumber, const std::string &desc="None", const std::string &loc="Unknown") | |
ExceptionObject (const ExceptionObject &orig) | |
virtual bool | operator== (const ExceptionObject &orig) |
virtual void | SetLocation (const std::string &s) |
virtual void | SetDescription (const std::string &s) |
virtual void | SetLocation (const char *s) |
virtual void | SetDescription (const char *s) |
virtual const char * | GetLocation () const |
virtual const char * | GetDescription () const |
ExceptionObject provides standard methods for throwing and managing exceptions in itk. Specific exceptions should be derived from this class. Note that this class is derived from std::exception, so an application can catch ITK exceptions as std::exception if desired.
ExceptionObject maintains two types of information: a location and description (both of which are strings). The location is the point in the code where the exception was thrown; the description is an error message that describes the exception. The ExceptionObject can be thrown explicitly in code, or more conveniently, the itkExceptionMacro (found in Common/itkMacro.h) can be used.
Definition at line 47 of file itkExceptionObject.h.
|
Definition at line 50 of file itkExceptionObject.h. |
|
Various types of constructors. Note that these functions will be called when children are instantiated. Definition at line 53 of file itkExceptionObject.h. Referenced by itk::RangeError::GetNameOfClass(). |
|
Various types of constructors. Note that these functions will be called when children are instantiated. Definition at line 61 of file itkExceptionObject.h. |
|
Various types of constructors. Note that these functions will be called when children are instantiated. Definition at line 70 of file itkExceptionObject.h. |
|
Virtual destructor needed for subclasses. Has to have empty throw(). Definition at line 80 of file itkExceptionObject.h. |
|
Methods to get and set the Location and Description fields. The Set methods are overloaded to support both std::string and const char array types. Get methods return const char arrays. Definition at line 131 of file itkExceptionObject.h. |
|
What file did the exception occur in? Definition at line 136 of file itkExceptionObject.h. |
|
What line did the exception occur in? Definition at line 140 of file itkExceptionObject.h. |
|
Methods to get and set the Location and Description fields. The Set methods are overloaded to support both std::string and const char array types. Get methods return const char arrays. Definition at line 129 of file itkExceptionObject.h. |
|
Reimplemented in itk::RangeError, itk::InvalidArgumentError, and itk::IncompatibleOperandsError. Definition at line 109 of file itkExceptionObject.h. |
|
Assignment operator. Definition at line 83 of file itkExceptionObject.h. References m_Description, m_File, m_Line, and m_Location. |
|
Equivalence operator. Definition at line 93 of file itkExceptionObject.h. |
|
Print exception information. This method can be overridden by specific exception subtypes. The default is to print out the location where the exception was first thrown and any description provided by the ``thrower''. |
|
Methods to get and set the Location and Description fields. The Set methods are overloaded to support both std::string and const char array types. Get methods return const char arrays. Definition at line 127 of file itkExceptionObject.h. |
|
Methods to get and set the Location and Description fields. The Set methods are overloaded to support both std::string and const char array types. Get methods return const char arrays. Definition at line 123 of file itkExceptionObject.h. Referenced by itk::ImageFileReaderException::ImageFileReaderException(), itk::ImageFileWriterException::ImageFileWriterException(), and itk::RegularStepGradientDescentBaseOptimizer::StepAlongGradient(). |
|
Methods to get and set the Location and Description fields. The Set methods are overloaded to support both std::string and const char array types. Get methods return const char arrays. Definition at line 125 of file itkExceptionObject.h. |
|
Methods to get and set the Location and Description fields. The Set methods are overloaded to support both std::string and const char array types. Get methods return const char arrays. Definition at line 121 of file itkExceptionObject.h. Referenced by itk::RegularStepGradientDescentBaseOptimizer::StepAlongGradient(). |
|
Provide std::exception::what() implementation. Definition at line 144 of file itkExceptionObject.h. |