#include <exception.h>
Public Member Functions | |
| Exception (Enumeration &type, const std::string &message, const std::string &filename, unsigned int linenum) | |
| Constructor - Initializes the exception and logs it. | |
| Exception (const std::string &message, const std::string &filename, unsigned int linenum) | |
| Constructor - Initializes the exception and logs it. | |
| virtual | ~Exception () |
| const std::string & | What () const |
| const std::string & | File () const |
| unsigned int | Line () const |
| |
| const Enumeration & | TypeEnum () const |
| |
| std::string | ToString () const |
| Converts this exception to a string. | |
| void | Print () |
| Prints the exception to the console. | |
| void | LogException (dtUtil::Log::LogMessageType level) const |
| logs the exception to the default logger. | |
| void | LogException (dtUtil::Log::LogMessageType level, const std::string &loggerName) const |
| logs the exception to the following log level using the logger. | |
| void | LogException (dtUtil::Log::LogMessageType level, dtUtil::Log &logger) const |
| logs the exception to the following log level using the given logger. | |
Protected Attributes | |
| Enumeration & | mType |
| std::string | mMessage |
| std::string | mFileName |
| unsigned int | mLineNum |
| dtUtil::Exception::Exception | ( | Enumeration & | type, | |
| const std::string & | message, | |||
| const std::string & | filename, | |||
| unsigned int | linenum | |||
| ) |
Constructor - Initializes the exception and logs it.
| type | - the type of exception being thrown. | |
| message | - Message to display about the exception. | |
| filename | - File the exception was thrown from. | |
| linenum | - Line number in the file from which the exception was thrown. |
| dtUtil::Exception::Exception | ( | const std::string & | message, | |
| const std::string & | filename, | |||
| unsigned int | linenum | |||
| ) |
Constructor - Initializes the exception and logs it.
| message | - Message to display about the exception. | |
| filename | - File the exception was thrown from. | |
| linenum | - Line number in the file from which the exception was thrown. |
| virtual dtUtil::Exception::~Exception | ( | ) | [inline, virtual] |
| const std::string& dtUtil::Exception::What | ( | ) | const [inline] |
| const std::string& dtUtil::Exception::File | ( | ) | const [inline] |
| unsigned int dtUtil::Exception::Line | ( | ) | const [inline] |
| const Enumeration& dtUtil::Exception::TypeEnum | ( | ) | const [inline] |
| std::string dtUtil::Exception::ToString | ( | ) | const |
Converts this exception to a string.
The string contains the reason, line number and file the exception was thrown from.
| void dtUtil::Exception::Print | ( | ) |
Prints the exception to the console.
| void dtUtil::Exception::LogException | ( | dtUtil::Log::LogMessageType | level | ) | const |
logs the exception to the default logger.
| level | The level/type of logging |
| void dtUtil::Exception::LogException | ( | dtUtil::Log::LogMessageType | level, | |
| const std::string & | loggerName | |||
| ) | const |
logs the exception to the following log level using the logger.
| level | The level/type of logging | |
| loggerName | the name passed to "getInstance" of the Logger. |
| void dtUtil::Exception::LogException | ( | dtUtil::Log::LogMessageType | level, | |
| dtUtil::Log & | logger | |||
| ) | const |
logs the exception to the following log level using the given logger.
| level | The level/type of logging | |
| logger | the actual log instance used to log. |
Enumeration& dtUtil::Exception::mType [protected] |
std::string dtUtil::Exception::mMessage [protected] |
std::string dtUtil::Exception::mFileName [protected] |
unsigned int dtUtil::Exception::mLineNum [protected] |