#include <ustl.h>
Inheritance diagram for ustl::exception:
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) |
|
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. |