Subversion Repositories Applications.gtt

Rev

Rev 94 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
94 jpm 1
<?php
2
/**
3
 * DataObjects error handler, loaded on demand...
4
 *
5
 * DB_DataObject_Error is a quick wrapper around pear error, so you can distinguish the
6
 * error code source.
7
 *
8
 * PHP versions 4 and 5
9
 *
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.
15
 *
16
 * @category   Database
17
 * @package    DB_DataObject
18
 * @author     Alan Knowles <alan@akbkhome.com>
19
 * @copyright  1997-2005 The PHP Group
20
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
21
 * @version    CVS: $Id: Error.php,v 1.3 2005/03/23 02:35:35 alan_k Exp $
22
 * @link       http://pear.php.net/package/DB_DataObject
23
 */
24
 
25
 
26
class DB_DataObject_Error extends PEAR_Error
27
{
28
 
29
    /**
30
     * DB_DataObject_Error constructor.
31
     *
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
36
     *
37
     * @access public
38
     *
39
     * @see PEAR_Error
40
     */
41
    function DB_DataObject_Error($message = '', $code = DB_ERROR, $mode = PEAR_ERROR_RETURN,
42
              $level = E_USER_NOTICE)
43
    {
44
        $this->PEAR_Error('DB_DataObject Error: ' . $message, $code, $mode, $level);
45
 
46
    }
47
 
48
 
49
    // todo : - support code -> message handling, and translated error messages...
50
 
51
 
52
 
53
}