fireball Class Reference

#include <exceptions.h>

Inheritance diagram for fireball:

Inheritance graph
[legend]
Collaboration diagram for fireball:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

This class is for things that we want to just totally bail on. When this is thrown, something needs to catch it, print the message, and exit the whole program... The conveinence method bail() does just this.

Definition at line 101 of file exceptions.h.


Constructor & Destructor Documentation

fireball::fireball ( const int  ec,
const std::string &  msg,
const bool  use_errno = false 
)

Build an exception representing a deadly failue.

Parameters:
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.


Member Function Documentation

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().

Here is the caller graph for this function:

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.


Member Data Documentation

const std::string fireball::message [private]

Definition at line 116 of file exceptions.h.

Referenced by fireball().

int fireball::exit_val [private]

Definition at line 117 of file exceptions.h.

bool fireball::with_errno [private]

Definition at line 118 of file exceptions.h.

Referenced by fireball().

int fireball::saved_errno [private]

Definition at line 119 of file exceptions.h.

Referenced by fireball().


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

Generated on Tue May 13 11:32:45 2008 for consmgr by  doxygen 1.5.5