referenceexceptions [www ibpp org]


ïż

reference:exceptions [www.ibpp.org]










[[reference:exceptions]]

http://www.ibpp.org/












 


You are here: ibpp  reference  exceptions


Table of Contents



Exception
Handling

Exceptions
Classes


IBPP::Exception

IBPP::LogicException

IBPP::SQLException

IBPP::WrongType
Exception Handling

IBPP reports
errors exclusively through C++ exceptions. Return values of methods calls are
never used to return success or failure. All exceptions classes thrown by IBPP
derive from the std::exception class and re-implement their virtual method
const char* what(), making it easy to handle those either globally
of through dedicated catch handlers.
Exceptions Classes

IBPP::Exception
class Exception : public std::exception
{
public:
virtual const char* Origin() const throw() = 0;
virtual const char* what() const throw() = 0;
virtual ~Exception() throw();
};

This is the base class of all exceptions thrown by IBPP. It directly derives
from std::exception and only adds one Origin() method to the
standard interface.
Origin() is a string, specific to IBPP, which identifies which
part of the IBPP source code thrown the exception. This is mostly useful for
debugging and of low interest to the end-users of application programs using
IBPP.
IBPP::LogicException
class LogicException : public Exception
{
public:
virtual ~LogicException() throw();
};

IBPP::LogicException brings nothing new to the interface of IBPP::Exception.
It is only meant to distinguish, by name, between exceptions which are inherent
to IBPP itself from those (IBPP::SQLException) which are thrown when the
database engine reports operational errors.
IBPP::SQLException
class SQLException : public Exception
{
public:
virtual int SqlCode() const throw() = 0;
virtual int EngineCode() const throw() = 0;

virtual ~SQLException() throw();
};

IBPP::SQLException reports errors returned by the database engine itself.
IBPP::SQLException adds two specific members to the generic IBPP::Exception
interface.
SqlCode() returns the eventual standard SQL error code.
EngineCode() returns the internal engine error code.
You should read some more documentation on Firebird to get all the details
and the differences between those two values and how you can make use of them.

IBPP::WrongType
class WrongType : public LogicException
{
public:
virtual ~WrongType() throw();
};

IBPP::WrongType is a specialization of IBPP::LogicException which brings
nothing new to the interface of LogicException. It is only meant to distinguish
(by the exception name) some specific kind of LogicException.




reference\exceptions.txt · Last modified: 2006/05/28 11:11 by
olivier










 







Wyszukiwarka

Podobne podstrony:
referenceeventinterface [www ibpp org]
referencetimestamp [www ibpp org]
reference [www ibpp org]
referenceevents [www ibpp org]
referencesamples [www ibpp org]
referencearray [www ibpp org]
referencecompilers [www ibpp org]
referenceblob [www ibpp org]
referenceclientlibsearchpaths [www ibpp org]
referencedate [www ibpp org]
referencetime [www ibpp org]
referenceguidelines [www ibpp org]
referenceconversions [www ibpp org]
referencedatabase [www ibpp org]
referenceuser [www ibpp org]
referencetransaction [www ibpp org]
referencestatement [www ibpp org]
referenceoverview [www ibpp org]
referenceservice [www ibpp org]

więcej podobnych podstron