Class IDAException

IDAException is the parent class for all Data Access exceptions.


Hierarchy

Inherits from:

IException
 |
 +----IDAException

Public Functions by Category

Constructors

IDAException

public:
IDAException( const char* a
            , unsigned long b = 0
            , Severity c = unrecoverable
            , long anSQLCODE = 0
            , char* anSQLSTATE = 0 );
IDAException( unsigned long messageNumber
            , Severity c = unrecoverable
            , long anSQLCODE = 0
            , char* anSQLSTATE = 0 );
IDAException( const IDAException& );
IDAException( const IException& );
IDAException();
Supported Platforms
Windows OS/2 AIX
Y Y Y

Destructor

~IDAException

public:
virtual ~IDAException();
Supported Platforms
Windows OS/2 AIX
Y Y Y

Exception Handling

name

virtual const char* name() const;

This method returns the name of the current exception object.

Supported Platforms
Windows OS/2 AIX
Y Y Y

errorProvided

IBoolean errorProvided() const;

Use this method to determine whether the current exception is the result of an error reported by the datastore. Returns true if it was reported by the datastore (and there is an error provided), or false if it was not.

Supported Platforms
Windows OS/2 AIX
Y Y Y

errorState

const char* errorState() const;

Use this method to return the SQL state at the time of the exception. This method returns null if errorProvided returns false.

Supported Platforms
Windows OS/2 AIX
Y Y Y

errorCode

long errorCode() const;

Use this method to return the SQL code at the time of the exception. This method returns null if errorProvided returns false.

Supported Platforms
Windows OS/2 AIX
Y Y Y

errorAsString

IString errorAsString() const;

Use this method to return the SQL code and state as a string. This method returns an empty string if errorProvided returns false.

Supported Platforms
Windows OS/2 AIX
Y Y Y

getSqlca

struct DA_sqlca getSqlca() const;

Use this method to get the SQL code and SQL state information contained in the SQLCA at the time of the exception. This method is provided for backward compatibility with Data Access Builder v. 1.0.

Supported Platforms
Windows OS/2 AIX
Y Y Y

Protected Data by Category

Exception Handling

IBoolean iErrorProvided;
long iSQLCODE;
IString iSQLSTATE;
Supported Platforms
Windows OS/2 AIX
Y Y Y