#include <itkExceptionObject.h>
Inheritance diagram for itk::ExceptionObject:
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.
|
Various types of constructors. Note that these functions will be called when children are instantiated. Definition at line 52 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 60 of file itkExceptionObject.h. |
|
Various types of constructors. Note that these functions will be called when children are instantiated. Definition at line 69 of file itkExceptionObject.h. References m_Description, m_File, m_Line, and m_Location. |
|
Virtual destructor needed for subclasses. Has to have empty throw(). Definition at line 79 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 130 of file itkExceptionObject.h. |
|
What file did the exception occur in? Definition at line 135 of file itkExceptionObject.h. |
|
What line did the exception occur in? Definition at line 139 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 128 of file itkExceptionObject.h. |
|
Reimplemented in itk::RangeError, itk::InvalidArgumentError, and itk::IncompatibleOperandsError. Definition at line 108 of file itkExceptionObject.h. |
|
Assignment operator. Definition at line 82 of file itkExceptionObject.h. References m_Description, m_File, m_Line, and m_Location. |
|
Equivalence operator. Definition at line 92 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 126 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 122 of file itkExceptionObject.h. Referenced by itk::ImageFileReaderException::ImageFileReaderException(), itk::ImageFileWriterException::ImageFileWriterException(), itk::ConstNeighborhoodIterator< FixedImageType >::IsAtEnd(), 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 124 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 120 of file itkExceptionObject.h. Referenced by itk::RegularStepGradientDescentBaseOptimizer::StepAlongGradient(). |
|
Provide std::exception::what() implementation. Definition at line 143 of file itkExceptionObject.h. |