dodo
0.0.1
A C++ library to create containerized Linux services
|
An Exception is thrown in exceptional circumstances, and its occurrence should generally imply that the program should stop, as it has entered a state it was never designed to handle. More...
#include <exception.hpp>
Public Member Functions | |
Exception (const std::string &file, unsigned int line, const std::string &what) | |
Construct an Exception. More... | |
Exception (const std::string &file, unsigned int line, const std::string &what, const DebugObject *thing) | |
Construct an Exception. More... | |
const std::string & | getFile () const |
Return the source file where the exception was thrown. More... | |
unsigned int | getLine () const |
Return the line number in the source file where the exception was thrown. More... | |
virtual const char * | what () const noexcept |
Return the exception message. More... | |
Protected Attributes | |
std::string | file_ |
The source file. More... | |
unsigned int | line_ |
The source line number. More... | |
std::string | msg_ |
The exception message. More... | |
An Exception is thrown in exceptional circumstances, and its occurrence should generally imply that the program should stop, as it has entered a state it was never designed to handle.
When used in conjunction with the throw_Exception() and throw_SystemException() macros, the source file and line number where the Exception is thrown are picked up automatically.
Definition at line 83 of file exception.hpp.
dodo::common::Exception::Exception | ( | const std::string & | file, |
unsigned int | line, | ||
const std::string & | what | ||
) |
Construct an Exception.
Use the throw_Exception() macro to construct and throw Exceptions.
file | The source file where the exception was raised. |
line | The line number where the exception was raised. |
what | The exception message. |
Definition at line 55 of file exception.cpp.
References file_, line_, msg_, and what().
dodo::common::Exception::Exception | ( | const std::string & | file, |
unsigned int | line, | ||
const std::string & | what, | ||
const DebugObject * | thing | ||
) |
Construct an Exception.
Use the throw_ExceptionObject() macro to construct and throw Exceptions.
file | The source file where the exception was raised. |
line | The line number where the exception was raised. |
what | The exception message. |
thing | The exception context. |
Definition at line 62 of file exception.cpp.
References dodo::common::DebugObject::debugString(), file_, line_, msg_, and what().
|
inline |
Return the source file where the exception was thrown.
Definition at line 118 of file exception.hpp.
References file_.
|
inline |
Return the line number in the source file where the exception was thrown.
Definition at line 124 of file exception.hpp.
References line_.
|
virtualnoexcept |
Return the exception message.
Definition at line 73 of file exception.cpp.
References msg_.
Referenced by Exception(), and dodo::network::TCPListener::run().
|
protected |
The source file.
Definition at line 124 of file exception.hpp.
Referenced by Exception(), and getFile().
|
protected |
The source line number.
Definition at line 129 of file exception.hpp.
Referenced by Exception(), and getLine().
|
protected |
The exception message.
Definition at line 131 of file exception.hpp.
Referenced by Exception(), and what().