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 (const std::wstring &messagePrm, const std::wstring &SQLStatePrm=DEFAULTSQLSTATE, CarobException *causePrm=0, int vendorPrm=DEFAULTVENDORCODE)
 Constructs an 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 ( const std::wstring &  messagePrm,
const std::wstring &  SQLStatePrm = DEFAULTSQLSTATE,
CarobException causePrm = 0,
int  vendorPrm = DEFAULTVENDORCODE 
) [inline]

Constructs an UnexpectedException with the given message.

Parameters:
messagePrm the detailed user-friendly message
SQLStatePrm the SQL2 standard error code.
causePrm the exception that generated this one, if any.
vendorPrm the (deprecated) SQL1 error code
See also:
CarobException


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 Fri Mar 9 17:40:20 2007 for Carob by  doxygen 1.4.7