VICI
0.11.815
Visual Chart Interpreter
|
An exception object with severity levels. More...
#include <vici/vx.h>
Public Member Functions | |
vxt (Severity s) | |
constructor More... | |
vxt (Severity s, const std::string &f, int ln) | |
constructor More... | |
template<class T > | |
vxt & | operator<< (T x) |
Provide stream syntax for the exception object. | |
Severity | severity () |
get the severity of the exception | |
virtual const char * | what () const throw () |
get the message from the exception | |
Static Public Member Functions | |
static const std::string & | sevToString (VICI::Severity s) |
Convert a severity into a string. | |
Protected Attributes | |
Severity | mSeverity |
severity level of the exception | |
std::string | buff |
message built into this | |
std::string | file |
source file from which it was thrown | |
int | line |
line number in the source file | |
int | ptr |
insertion point for message text | |
An exception object with severity levels.
The vxt class is an exception object that includes severity levels and has stream syntax for creating messages.
Typical usage: throw vxt(VICI::Error) << "something went wrong: " << strerror(errno);
A macro version that automatically records the file name and line number is also defined. It would be used like:
throw VX(Warning) << "there is a problem";
constructor
s | The severity of the problem. |
constructor
s | the severity of the exception |
f | the file name of the source file |
ln | the line number of the source file |