DCL 3.7.4
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__cause

Detailed Description

Definition at line 22 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 40 of file SQLDriver.cpp.

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

◆ SQLDriverException() [3/3]

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

Definition at line 45 of file SQLDriver.cpp.

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

Member Function Documentation

◆ toString()

String SQLDriverException::toString ( ) const
virtual

Reimplemented from Exception.

Definition at line 51 of file SQLDriver.cpp.

52{
53 StringBuilder r = __name;
54
55 r += __T(": ");
56
57 if (Exception::cause() != NULL) {
59 }
60 else {
61 switch (__errorCode) {
62 case eInvalidDriverModule:
63 r += __T("Invalid Driver Module");
64 break;
65 case eInvalidVersion:
66 r += __T("Invalid DCL_SQL_VERSION");
67 break;
68 case eInitializeFail:
69 r += __T("Initialize callback fail!");
70 break;
71 case eCleanupFail:
72 r += __T("cleanup callback falil");
73 break;
74 default:
75 __DCL_ASSERT(false);
76 }
77
78 if (!__driverSummary.isEmpty())
79 r += __T(" :") + __driverSummary;
80 }
81
82 return r;
83}
#define NULL
Definition Config.h:312
IOException *size_t r
Definition MediaInfo.cpp:82
#define __DCL_ASSERT(expr)
Definition Object.h:394
#define __T(str)
Definition Object.h:60
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: