Peano
TP::error Class Reference

Another nice thing: The TwoPunctures Error, borrowed from Pizza. More...

#include <TP_Logging.h>

Inheritance diagram for TP::error:
Collaboration diagram for TP::error:

Public Member Functions

 error (const char *msg_)
 
virtual const char * what () const throw ()
 

Static Public Member Functions

static void unless (bool c, const char *m)
 
static void incase (bool c, const char *m)
 

Private Attributes

const char * msg
 

Detailed Description

Another nice thing: The TwoPunctures Error, borrowed from Pizza.

Use like: error::unless(something_to_check, "msg"); if(something) throw error("foo"); etc.

Definition at line 65 of file TP_Logging.h.

Constructor & Destructor Documentation

◆ error()

TP::error::error ( const char *  msg_)

Definition at line 69 of file TP_Logging.h.

Referenced by unless().

Here is the caller graph for this function:

Member Function Documentation

◆ incase()

static void TP::error::incase ( bool  c,
const char *  m 
)
static

Definition at line 78 of file TP_Logging.h.

References acoustic::c, and unless().

Here is the call graph for this function:

◆ unless()

static void TP::error::unless ( bool  c,
const char *  m 
)
static

Definition at line 74 of file TP_Logging.h.

References acoustic::c, and error().

Referenced by incase().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ what()

virtual const char* TP::error::what ( ) const
throw (
)
virtual

Definition at line 70 of file TP_Logging.h.

References msg.

Field Documentation

◆ msg

const char* TP::error::msg
private

Definition at line 67 of file TP_Logging.h.

Referenced by what().


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