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. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP Version 4                                                        |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2002 The PHP Group                                |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 2.02 of the PHP license,      |
  9. // | that is bundled with this package in the file LICENSE, and is        |
  10. // | available at through the world-wide-web at                           |
  11. // | http://www.php.net/license/2_02.txt.                                 |
  12. // | If you did not receive a copy of the PHP license and are unable to   |
  13. // | obtain it through the world-wide-web, please send a note to          |
  14. // | license@php.net so we can mail you a copy immediately.               |
  15. // +----------------------------------------------------------------------+
  16. // | Authors:  Alan Knowles <alan@akbkhome.com>                           |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id: Error.php,v 1.1 2004/04/23 11:10:33 alan_k Exp $
  20. //
  21. //  DataObjects error handler, loaded on demand...
  22. //
  23.  
  24. /**
  25.  * DB_DataObject_Error is a quick wrapper around pear error, so you can distinguish the
  26.  * error code source.
  27.  * messages.
  28.  *
  29.  * @package  DB_DataObject
  30.  * @author Alan Knowles <alan@akbkhome.com>
  31.  */
  32. class DB_DataObject_Error extends PEAR_Error
  33. {
  34.     
  35.     /**
  36.      * DB_DataObject_Error constructor.
  37.      *
  38.      * @param mixed   $code   DB error code, or string with error message.
  39.      * @param integer $mode   what "error mode" to operate in
  40.      * @param integer $level  what error level to use for $mode & PEAR_ERROR_TRIGGER
  41.      * @param mixed   $debuginfo  additional debug info, such as the last query
  42.      *
  43.      * @access public
  44.      *
  45.      * @see PEAR_Error
  46.      */
  47.     function DB_DataObject_Error($message ''$code = DB_ERROR$mode = PEAR_ERROR_RETURN,
  48.               $level = E_USER_NOTICE)
  49.     {
  50.         $this->PEAR_Error('DB_DataObject Error: ' $message$code$mode$level);
  51.         
  52.     }
  53.     
  54.     
  55.     // todo : - support code -> message handling, and translated error messages...
  56.     
  57.     
  58.     
  59. }

Documentation generated on Mon, 11 Mar 2019 13:55:08 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.