rutz::error
is a basic exception class.
More...
#include <rutz/error.h>
Public Member Functions | |
error (const rutz::file_pos &pos) | |
Default construct with an empty message string. | |
error (const rutz::fstring &msg, const rutz::file_pos &pos) | |
Construct with an error message. | |
error (const error &other) throw () | |
Copy constructor. | |
virtual | ~error () throw () |
Virtual destructor. | |
virtual const char * | what () const throw () |
Get the decorated error message as a C-style string. | |
const rutz::file_pos & | src_pos () const throw () |
Get the source file position where the error was generated. | |
const rutz::backtrace & | get_backtrace () const throw () |
Get the stack back trace associated with this exception. | |
Static Public Member Functions | |
static void | get_last_backtrace (rutz::backtrace &dst) |
Copy out the back trace most recently used in constructing a rutz::error. | |
Protected Member Functions | |
void | set_msg (const rutz::fstring &new_msg) throw () |
Reset the error message. | |
const rutz::fstring & | get_msg () const throw () |
Get the (un-decorated) error message. |
rutz::error
is a basic exception class.
It carries a string message describing the error as well as information about the location in the source code in which the exception was generated.
Definition at line 55 of file error.h.
rutz::error::error | ( | const rutz::file_pos & | pos | ) |
Default construct with an empty message string.
Definition at line 60 of file error.cc.
References rutz::backtrace::print().
rutz::error::error | ( | const rutz::fstring & | msg, | |
const rutz::file_pos & | pos | |||
) |
Construct with an error message.
Definition at line 86 of file error.cc.
References rutz::backtrace::print().
rutz::error::error | ( | const error & | other | ) | throw () |
rutz::error::~error | ( | ) | throw () [virtual] |
const rutz::backtrace& rutz::error::get_backtrace | ( | ) | const throw () [inline] |
void rutz::error::get_last_backtrace | ( | rutz::backtrace & | dst | ) | [static] |
Copy out the back trace most recently used in constructing a rutz::error.
const rutz::fstring& rutz::error::get_msg | ( | ) | const throw () [inline, protected] |
void rutz::error::set_msg | ( | const rutz::fstring & | new_msg | ) | throw () [inline, protected] |
const rutz::file_pos& rutz::error::src_pos | ( | ) | const throw () [inline] |
const char * rutz::error::what | ( | ) | const throw () [virtual] |
Get the decorated error message as a C-style string.
Definition at line 135 of file error.cc.
References rutz::fstring::c_str(), rutz::fstring::length(), and log10().