3 * DataObjects error handler, loaded on demand...
5 * DB_DataObject_Error is a quick wrapper around pear error, so you can distinguish the
10 * LICENSE: This source file is subject to version 3.0 of the PHP license
11 * that is available through the world-wide-web at the following URI:
12 * http://www.php.net/license/3_0.txt. If you did not receive a copy of
13 * the PHP License and are unable to obtain it through the web, please
14 * send a note to license@php.net so we can mail you a copy immediately.
17 * @package DB_DataObject
18 * @author Alan Knowles <alan@akbkhome.com>
19 * @copyright 1997-2006 The PHP Group
20 * @license http://www.php.net/license/3_0.txt PHP License 3.0
21 * @version CVS: $Id: Error.php 277015 2009-03-12 05:51:03Z alan_k $
22 * @link http://pear.php.net/package/DB_DataObject
26 class DB_DataObject_Error extends PEAR_Error
30 * DB_DataObject_Error constructor.
32 * @param mixed $code DB error code, or string with error message.
33 * @param integer $mode what "error mode" to operate in
34 * @param integer $level what error level to use for $mode & PEAR_ERROR_TRIGGER
35 * @param mixed $debuginfo additional debug info, such as the last query
41 function DB_DataObject_Error($message = '', $code = DB_ERROR, $mode = PEAR_ERROR_RETURN,
42 $level = E_USER_NOTICE)
44 $this->PEAR_Error('DB_DataObject Error: ' . $message, $code, $mode, $level);
49 // todo : - support code -> message handling, and translated error messages...