DCL 4.0
Loading...
Searching...
No Matches
SQLDriverException Class Reference

#include <SQLDriver.h>

Inheritance diagram for SQLDriverException:
Exception Object

Public Member Functions

 SQLDriverException (const String &_name, Exception *_cause)
 SQLDriverException (const String &_name, ErrorCode _errorCode)
 SQLDriverException (const String &_name, ErrorCode _errorCode, const String &_driverSummary)
virtual String toString () const
Public Member Functions inherited from Exception
 Exception (Exception *_cause=NULL)
const Exceptioncause () const
String toStringAll () const
virtual void destroy ()
Public Member Functions inherited from Object
String className () const
bool isInstanceOf (const std::type_info &typeinfo) const
virtual const std::type_info & typeInfo () const

Additional Inherited Members

Protected Member Functions inherited from Exception
virtual ~Exception ()
Protected Member Functions inherited from Object
virtual ~Object ()
 Object ()
Protected Attributes inherited from Exception
Exception__pCause

Detailed Description

Definition at line 20 of file SQLDriver.h.

Constructor & Destructor Documentation

◆ SQLDriverException() [1/3]

SQLDriverException::SQLDriverException ( const String & _name,
Exception * _cause )

◆ SQLDriverException() [2/3]

SQLDriverException::SQLDriverException ( const String & _name,
ErrorCode _errorCode )

Definition at line 41 of file SQLDriver.cpp.

42 : __name(_name), __errorCode(_errorCode)
43{
44}

◆ SQLDriverException() [3/3]

SQLDriverException::SQLDriverException ( const String & _name,
ErrorCode _errorCode,
const String & _driverSummary )

Definition at line 46 of file SQLDriver.cpp.

48 : __name(_name), __errorCode(_errorCode), __driverSummary(_driverSummary)
49{
50}

Member Function Documentation

◆ toString()

String SQLDriverException::toString ( ) const
virtual

Reimplemented from Exception.

Definition at line 52 of file SQLDriver.cpp.

53{
54 StringBuilder r = __name;
55
56 r += __T(": ");
57
58 if (Exception::cause() != NULL) {
60 }
61 else {
62 switch (__errorCode) {
63 case eInvalidDriverModule:
64 r += __T("Invalid Driver Module");
65 break;
66 case eInvalidVersion:
67 r += __T("Invalid DCL_SQL_VERSION");
68 break;
69 case eInitializeFail:
70 r += __T("Initialize callback fail!");
71 break;
72 case eCleanupFail:
73 r += __T("cleanup callback falil");
74 break;
75 default:
76 __DCL_ASSERT(false);
77 }
78
79 if (!__driverSummary.isEmpty())
80 r += __T(" :") + __driverSummary;
81 }
82
83 return r;
84}
#define NULL
Definition Config.h:340
#define __DCL_ASSERT(expr)
Definition Object.h:371
#define __T(str)
Definition Object.h:44
ByteString r
virtual String toString() const
Definition Exception.cpp:40
const Exception * cause() const
Definition Exception.h:50

The documentation for this class was generated from the following files: