ITK
4.4.0
Insight Segmentation and Registration Toolkit
|
#include <itkExceptionObject.h>
Standard exception handling object.
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 51 of file itkExceptionObject.h.
Classes | |
class | ReferenceCounterInterface |
Public Types | |
typedef std::exception | Superclass |
Public Member Functions | |
virtual const char * | GetDescription () const |
virtual const char * | GetFile () const |
virtual unsigned int | GetLine () const |
virtual const char * | GetLocation () const |
virtual const char * | GetNameOfClass () const |
ExceptionObject & | operator= (const ExceptionObject &orig) |
virtual bool | operator== (const ExceptionObject &orig) |
virtual void | Print (std::ostream &os) const |
virtual void | SetDescription (const std::string &s) |
virtual void | SetDescription (const char *s) |
virtual void | SetLocation (const std::string &s) |
virtual void | SetLocation (const char *s) |
virtual const char * | what () const throw ( ) |
virtual | ~ExceptionObject () throw ( ) |
ExceptionObject () | |
ExceptionObject (const char *file, unsigned int lineNumber=0, const char *desc="None", const char *loc="Unknown") | |
ExceptionObject (const std::string &file, unsigned int lineNumber=0, const std::string &desc="None", const std::string &loc="Unknown") | |
ExceptionObject (const ExceptionObject &orig) | |
Private Member Functions | |
const ExceptionData * | GetExceptionData () const |
Private Attributes | |
SmartPointer< const ReferenceCounterInterface > | m_ExceptionData |
typedef std::exception itk::ExceptionObject::Superclass |
Definition at line 54 of file itkExceptionObject.h.
itk::ExceptionObject::ExceptionObject | ( | ) |
Various types of constructors. Note that these functions will be called when children are instantiated. The default constructor and the copy constructor of ExceptionObject never throw an exception.
|
explicit |
Various types of constructors. Note that these functions will be called when children are instantiated. The default constructor and the copy constructor of ExceptionObject never throw an exception.
|
explicit |
Various types of constructors. Note that these functions will be called when children are instantiated. The default constructor and the copy constructor of ExceptionObject never throw an exception.
itk::ExceptionObject::ExceptionObject | ( | const ExceptionObject & | orig | ) |
Various types of constructors. Note that these functions will be called when children are instantiated. The default constructor and the copy constructor of ExceptionObject never throw an exception.
|
virtual |
Virtual destructor needed for subclasses. Has to have empty throw().
|
virtual |
Referenced by ComputeHash(), and RegressionTestImage().
|
private |
|
virtual |
What file did the exception occur in?
|
virtual |
What line did the exception occur in?
|
virtual |
|
inlinevirtual |
Reimplemented in itk::fem::FEMExceptionItpackSolver, itk::fem::FEMExceptionLinearSystemBounds, itk::fem::FEMExceptionLinearSystem, itk::fem::FEMExceptionItpackSparseMatrixSbsij, itk::ProcessAborted, itk::fem::FEMExceptionItpackSparseMatrixSbagn, itk::IncompatibleOperandsError, itk::InvalidArgumentError, itk::RangeError, itk::MemoryAllocationError, itk::fem::FEMExceptionSolution, itk::fem::FEMExceptionObjectNotFound, itk::fem::FEMExceptionWrongClass, itk::InvalidRequestedRegionError, itk::fem::FEMExceptionIO, itk::DataObjectError, itk::fem::FEMException, itk::MeshFileReaderException, itk::ImageFileReaderException, itk::ImageSeriesWriterException, itk::ImageFileWriterException, itk::MeshFileWriterException, itk::HistogramWrongNumberOfComponents, itk::MissingHistogramBinMinimumInput, itk::MissingHistogramBinMaximumInput, itk::NullSizeHistogramInputMeasurementVectorSize, itk::MissingHistogramMarginalScaleInput, itk::MissingHistogramSizeInput, and itk::SampleToHistogramFilterException.
Definition at line 77 of file itkExceptionObject.h.
ExceptionObject& itk::ExceptionObject::operator= | ( | const ExceptionObject & | orig | ) |
Assignment operator.
|
virtual |
Equivalence operator.
|
virtual |
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''.
|
virtual |
|
virtual |
|
virtual |
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.
Referenced by itk::RegularStepGradientDescentBaseOptimizer::StepAlongGradient().
|
virtual |
|
virtual |
Provide std::exception::what() implementation.
|
private |
Definition at line 148 of file itkExceptionObject.h.