Overview   Class List   Class Hierarchy   Class Members   Functions & Constants   Defines   Header Files  

uima::Exception Class Reference

List of all members.

Detailed Description

Class Exception: This is the base class for all exceptions used in UIMACPP group projects.

An exception can be constructed from atext, that is supposed to be a simple description of the error with out context (e.g. "Could not open file") error number and an error severity (recoverable or unrecoverable). From this basic information a inital error info object is created which is a publicly avaiable member of the exception class. To this error info contexts can be added ( a context has a text and a location, see class ErrorInfo above).


Static methods.

The following static method can be called on the Exception class directly.

void release (std::string &msg)
 Release contents of string container allocated by asString methods.

Public Member Functions

 Exception (const ErrorMessage &rclMessage, TyErrorId ulErrorId, ErrorInfo::EnSeverity enSeverity)
 Constructor.
 Exception (const ErrorInfo &crclErrorInfo)
 Constructor from an existing error info object.
virtual ~Exception () UIMA_THROW0()
 Destructor.
virtual const char * getName () const
 name of the exception (automatically set to the name of the class by our macros)
virtual const char * what () const UIMA_THROW0()
 This is the ANSI standard exceptions way of returning the exception text.
virtual void terminate ()
 Called to terminate the program instead of actually throwing an exception if exception support is turned off.
virtual void logExceptionData ()
 Called to write out the exception error message before terminate the program if exception support is turned off.
std::string asString () const
 formatted for error output of the exception to a string
ErrorInfogetErrorInfo ()
 return a reference to the error info member object
const ErrorInfogetErrorInfo () const
 return a const reference to the error info member object

Static Public Member Functions

void assertParameter (const char *cpszExceptionText, ErrorContext clContext)


Constructor & Destructor Documentation

uima::Exception::Exception const ErrorMessage rclMessage,
TyErrorId  ulErrorId,
ErrorInfo::EnSeverity  enSeverity
 

Constructor.

Parameters:
rclMessage Message id describing what went wrong.
ulErrorId Error number.
enSeverity Recoverability info.
Note that the clMessage parameter should just state the plain info what went wrong (e.g. "Could not open file X"). Use an exception context to add information why, how it went wrong (e.g. "While trying to open application ini-file").

uima::Exception::Exception const ErrorInfo crclErrorInfo  ) 
 

Constructor from an existing error info object.

virtual uima::Exception::~Exception  )  [virtual]
 

Destructor.


Member Function Documentation

virtual const char* uima::Exception::getName  )  const [virtual]
 

name of the exception (automatically set to the name of the class by our macros)

virtual const char* uima::Exception::what  )  const [inline, virtual]
 

This is the ANSI standard exceptions way of returning the exception text.

virtual void uima::Exception::terminate  )  [virtual]
 

Called to terminate the program instead of actually throwing an exception if exception support is turned off.

virtual void uima::Exception::logExceptionData  )  [virtual]
 

Called to write out the exception error message before terminate the program if exception support is turned off.

void uima::Exception::assertParameter const char *  cpszExceptionText,
ErrorContext  clContext
[static]
 

std::string uima::Exception::asString  )  const
 

formatted for error output of the exception to a string

ErrorInfo & uima::Exception::getErrorInfo  )  [inline]
 

return a reference to the error info member object

const ErrorInfo & uima::Exception::getErrorInfo  )  const [inline]
 

return a const reference to the error info member object

void uima::Exception::release std::string &  msg  )  [static]
 

Release contents of string container allocated by asString methods.


The documentation for this class was generated from the following file:
Generated on Mon Oct 1 16:04:13 2012 for UIMACPP API by  doxygen 1.3.9.1