VICI  0.11.815
Visual Chart Interpreter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
VICI::vxt< N > Class Template Reference

An exception object with severity levels. More...

#include <vici/vx.h>

Inheritance diagram for VICI::vxt< N >:
VICI::cdi::scenario_exception VICI::cdi::test_exception

Public Member Functions

 vxt (Severity s)
 constructor More...
 
 vxt (Severity s, const std::string &f, int ln)
 constructor More...
 
template<class T >
vxtoperator<< (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
 

Detailed Description

template<typename N>
class VICI::vxt< N >

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 & Destructor Documentation

template<typename N >
VICI::vxt< N >::vxt ( Severity  s)
inlineexplicit

constructor

Parameters
sThe severity of the problem.
template<typename N >
VICI::vxt< N >::vxt ( Severity  s,
const std::string &  f,
int  ln 
)
inline

constructor

Parameters
sthe severity of the exception
fthe file name of the source file
lnthe line number of the source file

The documentation for this class was generated from the following file: