Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

rovsoft::lib::Throwable Class Reference

This is the base class of all classes thrown by modules of rovsoft. More...

#include <Throwable.hh>

Inheritance diagram for rovsoft::lib::Throwable:

Inheritance graph
[legend]
Collaboration diagram for rovsoft::lib::Throwable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Throwable (const std::string &mess="", ThrowablePtr cause=0)
 Constructs a throwable object with the message mess and a Throwable caused this Throwable.
virtual const ThrowablePtr getCause () const
 Returns the throwable that caused this one.
virtual const std::string & getMessage () const
 Returns a reference to the message of this object.
virtual const std::string toString () const
 Returns the message together with a time stamp and the class name of this object.
virtual void toStream (std::ostream &out) const
 The same as toString, but writes to a stream.
virtual void printBacktrace (std::ostream &out) const
 Prints toString from this object and from the one caused this one, .

Protected Member Functions

void toStreamHelper (std::ostream &out, char *className) const

Protected Attributes

std::string message
ost::Datetime time
ThrowablePtr pcause

Detailed Description

This is the base class of all classes thrown by modules of rovsoft.

It just implements a timestamped string, with cascading of Throwables caused this Throwable.


Constructor & Destructor Documentation

rovsoft::lib::Throwable::Throwable const std::string &  mess = "",
ThrowablePtr  cause = 0
[inline]
 

Constructs a throwable object with the message mess and a Throwable caused this Throwable.

Parameters:
mess A message hold by this Throwable.
cause A throwable that caused this throwable.


Member Function Documentation

const ThrowablePtr rovsoft::lib::Throwable::getCause  )  const [virtual]
 

Returns the throwable that caused this one.

const string & rovsoft::lib::Throwable::getMessage  )  const [virtual]
 

Returns a reference to the message of this object.

Don't store the return value in a reference or a pointer, copy it if you need it for a longer time!!

void rovsoft::lib::Throwable::printBacktrace std::ostream &  out  )  const [virtual]
 

Prints toString from this object and from the one caused this one, .

.. Beginning is the source of the whole thing.

Here is the call graph for this function:

void rovsoft::lib::Throwable::toStream std::ostream &  out  )  const [virtual]
 

The same as toString, but writes to a stream.

Reimplemented in rovsoft::io::EndOfSegmentException, rovsoft::io::InvalidEncodingException, rovsoft::io::IOException, rovsoft::io::PrefixedDataException, rovsoft::io::ReadOnlyException, rovsoft::io::TargetUnreachableException, rovsoft::io::UnprefixedMetaDataException, rovsoft::io::WriteOnlyException, rovsoft::lib::Exception, rovsoft::lib::NullPointerException, and rovsoft::lib::OutOfRangeException.

Here is the call graph for this function:

void rovsoft::lib::Throwable::toStreamHelper std::ostream &  out,
char *  className
const [protected]
 

Here is the call graph for this function:

const string rovsoft::lib::Throwable::toString  )  const [virtual]
 

Returns the message together with a time stamp and the class name of this object.

Here is the call graph for this function:


Member Data Documentation

std::string rovsoft::lib::Throwable::message [protected]
 

ThrowablePtr rovsoft::lib::Throwable::pcause [protected]
 

ost::Datetime rovsoft::lib::Throwable::time [protected]
 


The documentation for this class was generated from the following files:
Generated on Tue May 31 14:19:52 2005 for Rovsoft by  doxygen 1.4.3