PEAR_Error Class Info:

Class Declaration:

class PEAR_Error

File name:
Description:

Standard PEAR error class for PHP 4

This class is supserseded by {@link PEAR_Exception} in PHP 5

Link
Array
Category

pear

Package
PEAR
Author

Stig Bakken <ssb@php.net>

Tomas V.V. Cox <cox@idecnet.com>

Gregory Beaver <cellog@php.net>

Copyright

1997-2006 The PHP Group

License

http://opensource.org/licenses/bsd-license.php New BSD License

Version

Release: 1.9.0

See

PEAR::raiseError(), PEAR::throwError()

Since

Class available since PHP 4.0.2

Properties:

Show/Hide parent properties
  • backtrace

  • code

  • error_message_prefix

  • level

  • message

  • mode

  • userinfo

addUserInfo

top

Parameters:
  • $info required

Method defined in:
/usr/share/php/PEAR.php on line 1064

getBacktrace

top

Get the call backtrace from where the error was generated. Supported with PHP 4.3.0 or newer.

Parameters:
  • int $frame optional NULL

    (optional) what frame to fetch

Method defined in:
/usr/share/php/PEAR.php on line 1050
Return

array Backtrace, or NULL if not available.

Access

public

getCallback

top

Get the callback function/method from an error object.

Method defined in:
/usr/share/php/PEAR.php on line 963
Return

mixed callback function or object/method array

Access

public

getCode

top

Get error code from an error object

Method defined in:
/usr/share/php/PEAR.php on line 992
Return

int error code

Access

public

getDebugInfo

top

Get additional debug information supplied by the application.

Method defined in:
/usr/share/php/PEAR.php on line 1034
Return

string debug information

Access

public

getMessage

top

Get the error message from an error object.

Method defined in:
/usr/share/php/PEAR.php on line 977
Return

string full error message

Access

public

getMode

top

Get the error mode from an error object.

Method defined in:
/usr/share/php/PEAR.php on line 950
Return

int error mode

Access

public

getType

top

Get the name of this error/exception.

Method defined in:
/usr/share/php/PEAR.php on line 1006
Return

string error/exception name (type)

Access

public

getUserInfo

top

Get additional user-supplied information.

Method defined in:
/usr/share/php/PEAR.php on line 1020
Return

string user-supplied information

Access

public

PEAR_Error

top

PEAR_Error constructor

PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER, PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION

PEAR_ERROR_CALLBACK, the callback function or object/method tuple.

Parameters:
  • string $message optional 'unknown error'

    message

  • int $code optional NULL

    (optional) error code

  • int $mode optional NULL

    (optional) error mode, one of: PEAR_ERROR_RETURN,

  • mixed $options optional NULL

    (optional) error level, OR in the case of

  • string $userinfo optional NULL

    (optional) additional user/debug info

Method defined in:
/usr/share/php/PEAR.php on line 866
Access

public

toString

top

Make a string representation of this object.

Method defined in:
/usr/share/php/PEAR.php on line 1088
Return

string a string with an object summary

Access

public

__toString

top

Method defined in:
/usr/share/php/PEAR.php on line 1075