DB_DataObject
[ class tree: DB_DataObject ] [ index: DB_DataObject ] [ all elements ]

Source for file Error.php

Documentation is available at Error.php

  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.01 of the PHP license
  11.  * that is available through the world-wide-web at the following URI:
  12.  * http://www.php.net/license/3_01.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-2006 The PHP Group
  20.  * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
  21.  * @version    CVS: $Id: Error.php 287158 2009-08-12 13:58:31Z alan_k $
  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. }

Documentation generated on Mon, 11 Mar 2019 16:03:56 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.