Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ustl::exception Class Reference

Base class for exceptions, equivalent to std::exception. More...

#include <ustl.h>

Inheritance diagram for ustl::exception:

ustl::bad_alloc ustl::bad_cast ustl::libc_exception ustl::logic_error ustl::runtime_error ustl::file_exception ustl::stream_bounds_exception ustl::domain_error ustl::invalid_argument ustl::length_error ustl::out_of_range ustl::overflow_error ustl::range_error ustl::underflow_error List of all members.

Public Member Functions

exception void throw ()
virtual ~exception (void) throw ()
 Destroys the object.
virtual const char * what (void) const throw ()
 Returns the name of the exception.
virtual void info (string &msgbuf, const char *fmt=NULL) const throw ()
 Returns a descriptive error message. fmt="%s" Overloads of this functions must set NULL as the default fmt argument and handle that case to provide a default format string in case the user does not have a localized one. The format string should be shown in the documentation to not require translators to look through code. Also, this function must not throw anything, so you must wrap memory allocation routines (like string::format, for instance) in a try{}catch(...){} block.
virtual void read (istream &is)
 Reads the exception from stream is.
virtual void write (ostream &os) const
 Writes the exception into stream os as an IFF chunk.
void text_write (ostringstream &os) const
 Writes the exception as text into stream os.
virtual size_t stream_size (void) const
 Returns the size of the written exception.
xfmt_t format (void) const

Protected Member Functions

void set_format (xfmt_t fmt)

Detailed Description

Base class for exceptions, equivalent to std::exception.


Member Function Documentation

xfmt_t ustl::exception::format void   )  const [inline]
 

Format of the exception is used to lookup exception::info format string. Another common use is the instantiation of serialized exceptions, used by the error handler node chain to troubleshoot specific errors.


The documentation for this class was generated from the following files:
Generated on Mon Jan 17 14:35:02 2005 for uSTL by 1.3.9 Doxygen Hosted on SourceForge.net