====================
Exception aware eZDB
====================
Synopsis
========
eZDB can now be made exception aware by setting an error handling variable:
Usage
=====
This syntax will globally instruct each eZDBInterface instance to use exception based error handling::
eZDB::setErrorHandling( eZDB::ERROR_HANDLING_EXCEPTIONS );
A similar syntax can be used at instance level to set this behaviour only for a specific eZDBinterface instance:
eZDB::instance()->setErrorHandling( eZDB::ERROR_HANDLING_EXCEPTIONS );
Another constant represents the backward compatible, default handling mode: eZDB::ERROR_HANDLING_STANDARD.
Effect
======
With exception based handling, any error occuring while executing a query will throw an eZDBException instead of either
returning false (standard behaviour) or exiting with the red squared "A database transaction has failed".
In the later case (inside a transaction), the query is still automatically rollbacked, but exception based handling
will prevent Exponential from exiting directly and will either let you resume work or exit properly.
Exception aware eZDB
eZDB can now be made exception aware by setting an error handling variable:
Address: https://doc.exponential.earth/exphelp/viewer/features/4.5/ezdb_exception_based_error_handling.txt
Documentation license
This page was inherited from the documentation of the original software. It is not covered by the GNU Free Documentation License; it is distributed under the GNU General Public License, version 2.
Copyright (C) 1999 - 2014 eZ Systems AS and contributors