#include "b2exception.H"

Classes | |
| struct | Throw |
| struct | Warning |
Public Member Functions | |
| Exception (const std::string &msg_=std::string(), const char *file_=nullptr, int line_=-1) | |
| const char * | name () const noexcept |
| const char * | get_file () const |
| int | get_line () const |
| const std::string & | get_msg () const |
| const std::string & | get_backtrace (int start_level=1) const |
| template<typename T > | |
| Exception & | operator<< (const T &t) |
| template<typename T1 , typename T2 > | |
| Exception & | operator<< (const std::pair< T1, T2 > &t) |
| void | operator<< (const Throw &t) |
| void | operator<< (const Warning &w) |
Base class for exceptions. It supports composing of the error message like std::ostream, and it has support for backtraces, indicating the exact location in the source code where the exception was thrown.
|
inline |
Create an exception instance.
| msg_ | The message, or the beginning of the message. Empty by default. |
| file_ | A pointer to a string containing the file name. 0 by default. |
| line_ | The line number. -1 by default. |
| const std::string & b2000::Exception::get_backtrace | ( | int | start_level = 1 | ) | const |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
Convert a std::pair to a string and append it to the message.
|
inline |
Convert a value to a string and append it to the message.
|
inline |
Set the location and immediately throw the Exception instance.
|
inline |
Emit a warning message