Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
ustl::exception Class Reference

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

#include <ustl.h>

Inheritance diagram for ustl::exception:
std::bad_alloc ustl::bad_cast ustl::bad_typeid ustl::error_message 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

Classes

exception  noexcept
 

Public Types

typedef const CBacktracercbktrace_t
 

Public Member Functions

virtual const char * what (void) const noexcept
 
virtual void info (string &msgbuf, const char *fmt=nullptr) const noexcept
 Returns a descriptive error message. fmt="%s" Overloads of this functions must set nullptr 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 noexcept
 Writes the exception as text into stream os.
 
virtual size_t stream_size (void) const noexcept
 
xfmt_t format (void) const
 
rcbktrace_t backtrace (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 Sep 28 2015 17:58:50 for uSTL by Doxygen 1.8.10