MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Class encapsulating an error origin and description. More...
#include <mdsError.h>
Public Member Functions | |
CError (const std::string &sReason, const std::string &sFileName, int iLine) throw () | |
Error constructor. | |
CError (const CError &e) throw () | |
Copy constructor. | |
const std::string & | getFilename () const throw () |
Returns concrete filename. | |
int | getLine () const throw () |
Returns concrete line. | |
const std::string & | getReason () const throw () |
Returns description of exception reason. | |
virtual void | print (std::ostream &Stream) const |
Writes error description into the output stream in human readable form. | |
virtual const char * | what () const throw () |
Returns description of exception reason. | |
virtual | ~CError () throw () |
Virtual destructor. | |
Protected Attributes | |
int | m_iLine |
Line on which exception has risen. | |
std::string | m_sFilename |
File in which exception has risen. | |
std::string | m_sReason |
Exception reason. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CError &Error) |
Writes error description into the output stream. | |
std::ostream & | operator<< (std::ostream &Stream, const CFullException &Exception) |
Writes exception description into the output stream. |
Class encapsulating an error origin and description.
mds::base::CError::CError | ( | const std::string & | sReason, |
const std::string & | sFileName, | ||
int | iLine | ||
) | throw () |
Error constructor.
mds::base::CError::CError | ( | const CError & | e | ) | throw () |
Copy constructor.
virtual mds::base::CError::~CError | ( | ) | throw () [virtual] |
Virtual destructor.
const std::string& mds::base::CFullException::getFilename | ( | ) | const throw () [inherited] |
Returns concrete filename.
int mds::base::CFullException::getLine | ( | ) | const throw () [inherited] |
Returns concrete line.
const std::string& mds::base::CFullException::getReason | ( | ) | const throw () [inherited] |
Returns description of exception reason.
void mds::base::CError::print | ( | std::ostream & | Stream | ) | const [virtual] |
Writes error description into the output stream in human readable form.
Reimplemented from mds::base::CFullException.
const char * mds::base::CFullException::what | ( | ) | const throw () [virtual, inherited] |
Returns description of exception reason.
Reimplemented from mds::base::CException.
std::ostream& operator<< | ( | std::ostream & | os, |
const CError & | Error | ||
) | [friend] |
Writes error description into the output stream.
std::ostream& operator<< | ( | std::ostream & | Stream, |
const CFullException & | Exception | ||
) | [friend, inherited] |
Writes exception description into the output stream.
int mds::base::CFullException::m_iLine [protected, inherited] |
Line on which exception has risen.
std::string mds::base::CFullException::m_sFilename [protected, inherited] |
File in which exception has risen.
std::string mds::base::CFullException::m_sReason [protected, inherited] |
Exception reason.