19 #error "Do not include itkExceptionObject.h directly, include itkMacro.h instead."
22 #ifndef __itkExceptionObject_h
23 #define __itkExceptionObject_h
60 const char *desc =
"None",
const char *loc =
"Unknown");
61 explicit ExceptionObject(
const std::string & file,
unsigned int lineNumber = 0,
62 const std::string & desc =
"None",
63 const std::string & loc =
"Unknown");
77 virtual const
char * GetNameOfClass()
const
78 {
return "ExceptionObject"; }
84 virtual void Print(std::ostream & os)
const;
89 virtual void SetLocation(
const std::string & s);
91 virtual void SetDescription(
const std::string & s);
93 virtual void SetLocation(
const char *s);
95 virtual void SetDescription(
const char *s);
97 virtual const char * GetLocation()
const;
99 virtual const char * GetDescription()
const;
102 virtual const char * GetFile()
const;
105 virtual unsigned int GetLine()
const;
108 virtual const char * what()
const
140 virtual void Register()
const = 0;
142 virtual void UnRegister()
const = 0;
148 class ReferenceCountedExceptionData;
150 const ExceptionData * GetExceptionData()
const;
185 unsigned int lineNumber,
186 const std::string & desc,
187 const std::string & loc):
ExceptionObject(file, lineNumber, desc, loc) {}
194 {
return "MemoryAllocationError"; }
220 {
return "RangeError"; }
253 {
return "InvalidArgumentError"; }
279 {
return "IncompatibleOperandsError"; }
294 this->
SetDescription(
"Filter execution was aborted by an external request");
300 this->
SetDescription(
"Filter execution was aborted by an external request");
306 this->
SetDescription(
"Filter execution was aborted by an external request");
314 {
return "ProcessAborted"; }
318 #endif //__itkExceptionObject_h
320 #endif //__itkMacro_h
IncompatibleOperandsError()
ProcessAborted(const std::string &file, unsigned int lineNumber)
virtual ~MemoryAllocationError()
InvalidArgumentError(const char *file, unsigned int lineNumber)
virtual void SetDescription(const std::string &s)
IncompatibleOperandsError(const char *file, unsigned int lineNumber)
RangeError(const std::string &file, unsigned int lineNumber)
ProcessAborted(const char *file, unsigned int lineNumber)
static const double e
The base of the natural logarithm or Euler's number
virtual ~IncompatibleOperandsError()
virtual const char * GetNameOfClass() const
virtual ~ReferenceCounterInterface()
virtual ~ProcessAborted()
Standard exception handling object.
virtual ~InvalidArgumentError()
SmartPointer< const ReferenceCounterInterface > m_ExceptionData
InvalidArgumentError(const std::string &file, unsigned int lineNumber)
virtual const char * GetNameOfClass() const
MemoryAllocationError(const std::string &file, unsigned int lineNumber, const std::string &desc, const std::string &loc)
MemoryAllocationError(const std::string &file, unsigned int lineNumber)
std::ostream & operator<<(std::ostream &os, const Array< TValueType > &arr)
Implements transparent reference counting.
RangeError(const char *file, unsigned int lineNumber)
virtual const char * GetNameOfClass() const
IncompatibleOperandsError(const std::string &file, unsigned int lineNumber)
ReferenceCounterInterface()
MemoryAllocationError(const char *file, unsigned int lineNumber)
virtual const char * GetNameOfClass() const
virtual const char * GetNameOfClass() const
std::exception Superclass