Open Journal Systems  3.3.0
PEAR_Error Class Reference

Public Member Functions

 __construct ($message='unknown error', $code=null, $mode=null, $options=null, $userinfo=null)
 
 __toString ()
 
 addUserInfo ($info)
 
 getBacktrace ($frame=null)
 
 getCallback ()
 
 getCode ()
 
 getDebugInfo ()
 
 getMessage ()
 
 getMode ()
 
 getType ()
 
 getUserInfo ()
 
 PEAR_Error ( $message='unknown error', $code=null, $mode=null, $options=null, $userinfo=null)
 
 toString ()
 

Data Fields

 $backtrace = null
 
 $code = -1
 
 $error_message_prefix = ''
 
 $level = E_USER_NOTICE
 
 $message = ''
 
 $mode = PEAR_ERROR_RETURN
 
 $userinfo = ''
 

Detailed Description

Definition at line 871 of file PEAR.php.

Constructor & Destructor Documentation

◆ __construct()

PEAR_Error::__construct (   $message = 'unknown error',
  $code = null,
  $mode = null,
  $options = null,
  $userinfo = null 
)

PEAR_Error constructor

Parameters
string$messagemessage
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

@access public

Definition at line 901 of file PEAR.php.

References $code, $message, $mode, $userinfo, getMessage(), and PEAR\getStaticProperty().

Referenced by PEAR_Error().

Member Function Documentation

◆ __toString()

PEAR_Error::__toString ( )

Definition at line 1094 of file PEAR.php.

References getMessage().

◆ addUserInfo()

PEAR_Error::addUserInfo (   $info)

Definition at line 1085 of file PEAR.php.

◆ getBacktrace()

PEAR_Error::getBacktrace (   $frame = null)

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

Parameters
int$frame(optional) what frame to fetch
Returns
array Backtrace, or NULL if not available. @access public

Definition at line 1074 of file PEAR.php.

References $backtrace.

◆ getCallback()

PEAR_Error::getCallback ( )

Get the callback function/method from an error object.

Returns
mixed callback function or object/method array @access public

Definition at line 1006 of file PEAR.php.

◆ getCode()

PEAR_Error::getCode ( )

Get error code from an error object

Returns
int error code @access public

Definition at line 1028 of file PEAR.php.

References $code.

◆ getDebugInfo()

PEAR_Error::getDebugInfo ( )

Get additional debug information supplied by the application.

Returns
string debug information @access public

Definition at line 1061 of file PEAR.php.

References getUserInfo().

◆ getMessage()

PEAR_Error::getMessage ( )

Get the error message from an error object.

Returns
string full error message @access public

Definition at line 1017 of file PEAR.php.

Referenced by __construct(), and __toString().

◆ getMode()

PEAR_Error::getMode ( )

Get the error mode from an error object.

Returns
int error mode @access public

Definition at line 995 of file PEAR.php.

References $mode.

◆ getType()

PEAR_Error::getType ( )

Get the name of this error/exception.

Returns
string error/exception name (type) @access public

Definition at line 1039 of file PEAR.php.

◆ getUserInfo()

PEAR_Error::getUserInfo ( )

Get additional user-supplied information.

Returns
string user-supplied information @access public

Definition at line 1050 of file PEAR.php.

References $userinfo.

Referenced by getDebugInfo().

◆ PEAR_Error()

PEAR_Error::PEAR_Error (   $message = 'unknown error',
  $code = null,
  $mode = null,
  $options = null,
  $userinfo = null 
)

Only here for backwards compatibility.

Class "Cache_Error" still uses it, among others.

Parameters
string$messageMessage
int$codeError code
int$modeError mode
mixed$optionsSee __construct()
string$userinfoAdditional user/debug info

Definition at line 982 of file PEAR.php.

References $code, $message, $mode, $userinfo, and __construct().

◆ toString()

PEAR_Error::toString ( )

Make a string representation of this object.

Returns
string a string with an object summary @access public

Definition at line 1105 of file PEAR.php.

Field Documentation

◆ $backtrace

PEAR_Error::$backtrace = null

Definition at line 879 of file PEAR.php.

Referenced by getBacktrace().

◆ $code

PEAR_Error::$code = -1

Definition at line 876 of file PEAR.php.

Referenced by __construct(), getCode(), and PEAR_Error().

◆ $error_message_prefix

PEAR_Error::$error_message_prefix = ''

Definition at line 873 of file PEAR.php.

◆ $level

PEAR_Error::$level = E_USER_NOTICE

Definition at line 875 of file PEAR.php.

◆ $message

PEAR_Error::$message = ''

Definition at line 877 of file PEAR.php.

Referenced by __construct(), and PEAR_Error().

◆ $mode

PEAR_Error::$mode = PEAR_ERROR_RETURN

Definition at line 874 of file PEAR.php.

Referenced by __construct(), getMode(), and PEAR_Error().

◆ $userinfo

PEAR_Error::$userinfo = ''

Definition at line 878 of file PEAR.php.

Referenced by __construct(), getUserInfo(), and PEAR_Error().


The documentation for this class was generated from the following file: