Class PEAR_Error

Description

Standard PEAR error class for PHP 4

This class is supserseded by PEAR_Exception in PHP 5

Located in /PEAR.php (line 816)


	
			
Direct descendents
Class Description
DB_Error DB_Error implements a class for reporting portable database error messages
Variable Summary
mixed $backtrace
mixed $code
mixed $level
mixed $message
mixed $mode
mixed $userinfo
Method Summary
PEAR_Error PEAR_Error ([string $message = 'unknown error'], [int $code = null], [int $mode = null], [mixed $options = null], [string $userinfo = null])
void addUserInfo ( $info)
array getBacktrace ([int $frame = null])
mixed getCallback ()
int getCode ()
string getDebugInfo ()
string getMessage ()
int getMode ()
string getType ()
string getUserInfo ()
string toString ()
Variables
mixed $backtrace = null (line 826)
mixed $code = -1 (line 823)
mixed $error_message_prefix = '' (line 820)
mixed $level = E_USER_NOTICE (line 822)
mixed $message = '' (line 824)
mixed $mode = PEAR_ERROR_RETURN (line 821)
mixed $userinfo = '' (line 825)
Methods
Constructor PEAR_Error (line 851)

PEAR_Error constructor

  • access: public
PEAR_Error PEAR_Error ([string $message = 'unknown error'], [int $code = null], [int $mode = null], [mixed $options = null], [string $userinfo = null])
  • string $message: message
  • int $code: (optional) error code
  • int $mode: (optional) error mode, one of: PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER, PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION
  • mixed $options: (optional) error level, _OR_ in the case of PEAR_ERROR_CALLBACK, the callback function or object/method tuple.
  • string $userinfo: (optional) additional user/debug info
addUserInfo (line 1033)
void addUserInfo ( $info)
  • $info
getBacktrace (line 1019)

Get the call backtrace from where the error was generated.

Supported with PHP 4.3.0 or newer.

  • return: Backtrace, or NULL if not available.
  • access: public
array getBacktrace ([int $frame = null])
  • int $frame: (optional) what frame to fetch
getCallback (line 932)

Get the callback function/method from an error object.

  • return: callback function or object/method array
  • access: public
mixed getCallback ()
getCode (line 961)

Get error code from an error object

  • return: error code
  • access: public
int getCode ()
getDebugInfo (line 1003)

Get additional debug information supplied by the application.

  • return: debug information
  • access: public
string getDebugInfo ()
getMessage (line 946)

Get the error message from an error object.

  • return: full error message
  • access: public
string getMessage ()
getMode (line 919)

Get the error mode from an error object.

  • return: error mode
  • access: public
int getMode ()
getType (line 975)

Get the name of this error/exception.

  • return: error/exception name (type)
  • access: public
string getType ()
getUserInfo (line 989)

Get additional user-supplied information.

  • return: user-supplied information
  • access: public
string getUserInfo ()
toString (line 1051)

Make a string representation of this object.

  • return: a string with an object summary
  • access: public
string toString ()

Documentation generated on Wed, 28 Mar 2007 09:54:29 -0600 by phpDocumentor 1.3.1