Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

d_Error Class Reference

#include <d_Error.h>

List of all members.

Public Types

typedef d_Long kind

Public Methods

 d_Error ()
 d_Error (kind iKind)
 d_Error (const d_Error &iSource)
 ~d_Error ()
virtual const char * what () const throw ()
kind get_kind ()
void set_kind (kind iKind)
d_Error * get_detail ()
void set_detail (d_Error *iDetail)
bool contains (kind iKind)
d_Error & operator<< (const d_String &iInfo)
d_Error & operator<< (d_ULong iInfo)
d_Error & operator<< (const char *iInfo)
d_Error & operator<< (const d_Error &iInfo)


Detailed Description

Orient ODBMS exceptions and errors.

Orient exceptions are treated by raising d_Error objects.

For this reason each database operation (object management, queries, etc.) had to be included inside a C++ try-catch block. This means that there is no need to check the result at every database operation, but rather exception raised in a try block will be handled in the catch block (full C++ integration).

It inherits from C++ exception class.

LOCATION: d_Error.h

USAGE: try { ... } catch( d_Error* <err-object> ) { ... }

Where:

<ERR-OBJECT>: NAME OF D_ERROR OBJECT CAUGHT.

EXAMPLES: try { ... db.open( "business" ); ... } catch( d_Error* err ) { * CATCH DATABASE ERRORS cerr << "Database error :";

* SWITCHING ERROR KIND switch( err->get_kind() ) { case d_Error::d_Error_DatabaseOpen: cerr << "Database not open"; break;

default: cerr << "Generic"; } delete err; }

ODMG: Compliant


Member Typedef Documentation

typedef d_Long d_Error::kind
 


Constructor & Destructor Documentation

d_Error::d_Error  
 

Default Constructor.

ODMG : Compliant

d_Error::d_Error kind    iKind
 

Create a d_Error object specifying error kind.

Create a d_Error object with error kind equal to .

ODMG : Compliant

d_Error::d_Error const d_Error &    iSource
 

Copy Constructor.

ODMG : Compliant

d_Error::~d_Error  
 

Destructor.

ODMG : Compliant


Member Function Documentation

bool d_Error::contains kind    iKind
 

Check if contains the kind requested in the current object and in the detail objects.

ODMG : Extension

d_Error * d_Error::get_detail  
 

Get the Detail error if any, otherwise null.

ODMG : Extension

d_Error::kind d_Error::get_kind  
 

Returns error's kind.

ODMG : Compliant

d_Error & d_Error::operator<< const d_Error &    iInfo
 

Append the message of another d_Error object.

ODMG : Compliant

d_Error & d_Error::operator<< const char *    iInfo
 

Append a c-string to the error message.

ODMG : Compliant

d_Error & d_Error::operator<< d_ULong    iInfo
 

Append a integer to the error message.

ODMG : Compliant

d_Error & d_Error::operator<< const d_String   iInfo
 

Append a string to the error message.

ODMG : Compliant

void d_Error::set_detail d_Error *    iDetail
 

Set the Detail error.

ODMG : Extension

void d_Error::set_kind kind    iKind
 

Set error's kind.

ODMG : Compliant

const char * d_Error::what   const throw () [virtual]
 

Returns a message that describes the error.

ODMG : Compliant


The documentation for this class was generated from the following files:
Generated on Fri Nov 29 17:12:14 2002 for Orient ODBMS Just Edition v. 2.0e by doxygen1.3-rc1