You are here

class DB_Error in Flickr API 5

DB_Error implements a class for reporting portable database error messages

@category Database @package DB @author Stig Bakken <ssb@php.net> @copyright 1997-2005 The PHP Group @license http://www.php.net/license/3_0.txt PHP License 3.0 @version Release: @package_version@ @link http://pear.php.net/package/DB

Hierarchy

Expanded class hierarchy of DB_Error

6 string references to 'DB_Error'
DB::connect in phpFlickr/PEAR/DB.php
Create a new DB object including a connection to the specified database
DB::factory in phpFlickr/PEAR/DB.php
Create a new DB object for the specified database type but don't connect to the database
DB::isError in phpFlickr/PEAR/DB.php
Determines if a variable is a DB_Error object
DB_common::DB_common in phpFlickr/PEAR/DB/common.php
This constructor calls <kbd>$this->PEAR('DB_Error')</kbd>
DB_common::raiseError in phpFlickr/PEAR/DB/common.php
Communicates an error and invoke error callbacks, etc

... See full list

File

phpFlickr/PEAR/DB.php, line 867

View source
class DB_Error extends PEAR_Error {

  // {{{ constructor

  /**
   * DB_Error constructor
   *
   * @param mixed $code       DB error code, or string with error message
   * @param int   $mode       what "error mode" to operate in
   * @param int   $level      what error level to use for $mode &
   *                           PEAR_ERROR_TRIGGER
   * @param mixed $debuginfo  additional debug info, such as the last query
   *
   * @see PEAR_Error
   */
  function DB_Error($code = DB_ERROR, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE, $debuginfo = null) {
    if (is_int($code)) {
      $this
        ->PEAR_Error('DB Error: ' . DB::errorMessage($code), $code, $mode, $level, $debuginfo);
    }
    else {
      $this
        ->PEAR_Error("DB Error: {$code}", DB_ERROR, $mode, $level, $debuginfo);
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DB_Error::DB_Error function DB_Error constructor
PEAR_Error::$backtrace property
PEAR_Error::$code property
PEAR_Error::$error_message_prefix property
PEAR_Error::$level property
PEAR_Error::$message property
PEAR_Error::$mode property
PEAR_Error::$userinfo property
PEAR_Error::addUserInfo function
PEAR_Error::getBacktrace function Get the call backtrace from where the error was generated. Supported with PHP 4.3.0 or newer.
PEAR_Error::getCallback function Get the callback function/method from an error object.
PEAR_Error::getCode function Get error code from an error object
PEAR_Error::getDebugInfo function Get additional debug information supplied by the application.
PEAR_Error::getMessage function Get the error message from an error object.
PEAR_Error::getMode function Get the error mode from an error object.
PEAR_Error::getType function Get the name of this error/exception.
PEAR_Error::getUserInfo function Get additional user-supplied information.
PEAR_Error::PEAR_Error function PEAR_Error constructor
PEAR_Error::toString function Make a string representation of this object.