CarobNS::CarobException Class Reference

Mother class of all exceptions send by the driver defining common exception interface. More...

#include <CarobException.hpp>

Inheritance diagram for CarobNS::CarobException:

CarobNS::BackendException CarobNS::ControllerException CarobNS::DriverException CarobNS::ProtocolException CarobNS::SQLWarning CarobNS::UnexpectedException CarobNS::AuthenticationException CarobNS::CodecException CarobNS::ConnectionException CarobNS::ConversionException CarobNS::JavaSocketException CarobNS::NoMoreControllerException CarobNS::NotImplementedException CarobNS::NullValueException List of all members.

Public Member Functions

 CarobException (const CarobException &ce)
 Copy constructor.
 CarobException (const DriverSocket &sock)
 Constructs/reads a new Exception chain from the stream.
 CarobException (const std::wstring &messagePrm, const std::wstring &SQLStatePrm=DEFAULTSQLSTATE, CarobException *causePrm=0, int vendorPrm=DEFAULTVENDORCODE)
 Constructs a new exception with the specified detail message and cause.
virtual ~CarobException ()
 Destructor to clean up stack trace and cause exception.
virtual const std::wstring & description () const
 Gets the exception error message.
const StackTrace & getStackTrace () const
 Returns the remote java stack trace.
const BackTracegetBackTrace () const
 Returns the local stack trace.
const CarobExceptiongetNext () const
 Returns a reference to the next exception in the chain, NULL if tail.
const std::wstring & getSQLState () const
 get the SQLState if any
int getErrorCode () const
 Retrieves the vendor-specific exception code.

Protected Attributes

std::wstring message
 Error message.
StackTrace stackTrace
 Stack trace as a vector of traces.
CarobExceptioncausePtr
 pointer to the exception that generated this one
std::wstring SQLState
 SQL2 standard error code.
int errorCode
 Deprecated SQL1 "standard" error code.
const BackTrace backTrace
 Local stack trace when available.

Detailed Description

Mother class of all exceptions send by the driver defining common exception interface.


Constructor & Destructor Documentation

CarobNS::CarobException::CarobException ( const DriverSocket sock  ) 

Constructs/reads a new Exception chain from the stream.

Parameters:
sock socket from which to deserialize exception
Exceptions:
SocketIOException. Not specified in method signature because of forward declarations/loop issue (SocketIOException inherits from CarobException

CarobNS::CarobException::CarobException ( const std::wstring &  messagePrm,
const std::wstring &  SQLStatePrm = DEFAULTSQLSTATE,
CarobException causePrm = 0,
int  vendorPrm = DEFAULTVENDORCODE 
) [inline]

Constructs a new exception with the specified detail message and cause.

Note that the detail message associated with cause is not automatically incorporated in this exception's detail 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


Member Data Documentation

int CarobNS::CarobException::errorCode [protected]

Deprecated SQL1 "standard" error code.

Negative for errors, positive for warnings.


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