s11n::s11n_exception Struct Reference

The base-most exception type used by s11n. More...

#include <exception.hpp>

Inheritance diagram for s11n::s11n_exception:

s11n::factory_exception s11n::io_exception

List of all members.

Public Member Functions

virtual ~s11n_exception () throw ()
 s11n_exception (const char *format,...)
 Creates an exception with the given formatted what() string.
virtual const char * what () const throw ()
 Returns the 'what' string passed to the ctor.

Protected Member Functions

void what (std::string const &) throw ()
 Intended to be used by ctors.
 s11n_exception ()


Detailed Description

The base-most exception type used by s11n.

Definition at line 12 of file exception.hpp.


Constructor & Destructor Documentation

virtual s11n::s11n_exception::~s11n_exception (  )  throw () [inline, virtual]

Definition at line 15 of file exception.hpp.

s11n::s11n_exception::s11n_exception ( const char *  format,
  ... 
) [explicit]

Creates an exception with the given formatted what() string.

Takes a printf-like format string. If the expanded string is longer than some arbitrarily-chosen internal limit [hint: 2k bytes] then it is truncated.

If you get overload ambiguities with the std::string-argument ctor, this is because you've passed a (char const *) string to those ctors and relied on implicit conversion to std::string. Simply wrapping those c-strings in std::string ctors should get around the problem.

Historical note:

This ctor, introduced in version 1.2.6, conflicted with an older 3-arg ctor taking (std::string,char const *,uint) arguments, but this one is far more flexible, so the older was removed. We also had ctor taking a std::string, but that was removed to avoid additional ambiguities.

s11n::s11n_exception::s11n_exception (  )  [protected]


Member Function Documentation

virtual const char* s11n::s11n_exception::what (  )  const throw () [virtual]

Returns the 'what' string passed to the ctor.

void s11n::s11n_exception::what ( std::string const &   )  throw () [protected]

Intended to be used by ctors.


The documentation for this struct was generated from the following file:
Generated on Wed Jun 4 21:45:46 2008 for libs11n-1.2.7 by  doxygen 1.5.3