CarobNS::UnexpectedException Class Reference

The goal UnexpectedException of is to prevent from having a std::unexpected() call when a function throws an exception not declared in its prototype. More...

#include <CarobException.hpp>

Inheritance diagram for CarobNS::UnexpectedException:

CarobNS::CarobException List of all members.

Public Member Functions

 UnexpectedException (std::wstring s)
 Constructs a UnexpectedException with the given message.

Static Public Member Functions

static void convertUnexpected ()
 std::unexpected handler.

Detailed Description

The goal UnexpectedException of is to prevent from having a std::unexpected() call when a function throws an exception not declared in its prototype.

Thus, all functions declared as throwing an exception MUST also declare throw (UnexpectedException) so that even if an unknown exception is thrown at runtime, we still will catch it with catch (UnexpectedException e) .


Constructor & Destructor Documentation

CarobNS::UnexpectedException::UnexpectedException ( std::wstring  s  )  [inline]

Constructs a UnexpectedException with the given message.

Parameters:
s error message of the exception


Member Function Documentation

static void CarobNS::UnexpectedException::convertUnexpected (  )  [static]

std::unexpected handler.

Throws an Unexpected exception instead of terminating the program


The documentation for this class was generated from the following file:
Generated on Tue Oct 24 09:05:37 2006 for Carob by  doxygen 1.5.0