#include <exceptions.h>
Public Member Functions | |
fireball (const int exit_val, const std::string &msg, const bool with_errno=false) | |
Build an exception representing a deadly failue. | |
~fireball () throw () | |
void | bail (std::ostream &out) const throw () |
A conveinence wrapper around what() and exit(). | |
const char * | what (void) const throw () |
Private Attributes | |
const std::string | message |
int | exit_val |
bool | with_errno |
int | saved_errno |
Definition at line 101 of file exceptions.h.
fireball::fireball | ( | const int | ec, | |
const std::string & | msg, | |||
const bool | use_errno = false | |||
) |
Build an exception representing a deadly failue.
ec | Error code to exit program with. | |
msg | Textual message describing the reason for termination. | |
use_errno | A boolean to indicate whether ec should be used in generation of the textual message. |
Save the constructed string for later reporting
Definition at line 58 of file exceptions.cc.
References __progname, CMException::_what, message, saved_errno, and with_errno.
fireball::~fireball | ( | ) | throw () [inline] |
Definition at line 105 of file exceptions.h.
void fireball::bail | ( | std::ostream & | out | ) | const throw () [inline] |
A conveinence wrapper around what() and exit().
Definition at line 108 of file exceptions.h.
References CMException::_what.
Referenced by Incoming::listener_thread(), BiDirConn::reader_thread(), and Outlet::writer_thread().
const char * fireball::what | ( | void | ) | const throw () [virtual] |
Return the string generated at our construction that describes this error.
Reimplemented from CMException.
Definition at line 78 of file exceptions.cc.
References CMException::_what.
const std::string fireball::message [private] |
int fireball::exit_val [private] |
Definition at line 117 of file exceptions.h.
bool fireball::with_errno [private] |
int fireball::saved_errno [private] |