Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

PEAR_Error Class Reference

Inheritance diagram for PEAR_Error:

Inheritance graph
[legend]
List of all members.

Public Member Functions

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

Public Attributes

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

Constructor & Destructor Documentation

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

PEAR_Error constructor

Parameters:
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 or PEAR_ERROR_CALLBACK
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
public

Definition at line 698 of file PEAR.php.

References $code, $message, $mode, $options, $userinfo, getMessage(), PEAR_ERROR_CALLBACK, PEAR_ERROR_DIE, PEAR_ERROR_PRINT, PEAR_ERROR_RETURN, and PEAR_ERROR_TRIGGER.


Member Function Documentation

PEAR_Error::addUserInfo info  ) 
 

Definition at line 877 of file PEAR.php.

References addUserInfo().

Referenced by addUserInfo().

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. public

Definition at line 866 of file PEAR.php.

References getBacktrace().

Referenced by getBacktrace().

PEAR_Error::getCallback  ) 
 

Get the callback function/method from an error object.

Returns:
mixed callback function or object/method array public

Definition at line 779 of file PEAR.php.

PEAR_Error::getCode  ) 
 

Get error code from an error object

Returns:
int error code public

Definition at line 808 of file PEAR.php.

PEAR_Error::getDebugInfo  ) 
 

Get additional debug information supplied by the application.

Returns:
string debug information public

Definition at line 850 of file PEAR.php.

References getUserInfo().

PEAR_Error::getMessage  ) 
 

Get the error message from an error object.

Returns:
string full error message public

Definition at line 793 of file PEAR.php.

Referenced by PEAR_Error().

PEAR_Error::getMode  ) 
 

Get the error mode from an error object.

Returns:
int error mode public

Definition at line 766 of file PEAR.php.

PEAR_Error::getType  ) 
 

Get the name of this error/exception.

Returns:
string error/exception name (type) public

Definition at line 822 of file PEAR.php.

PEAR_Error::getUserInfo  ) 
 

Get additional user-supplied information.

Returns:
string user-supplied information public

Definition at line 836 of file PEAR.php.

Referenced by getDebugInfo().

PEAR_Error::toString  ) 
 

Make a string representation of this object.

Returns:
string a string with an object summary public

Definition at line 895 of file PEAR.php.

References PEAR_ERROR_CALLBACK, PEAR_ERROR_DIE, PEAR_ERROR_PRINT, PEAR_ERROR_RETURN, and PEAR_ERROR_TRIGGER.


Member Data Documentation

PEAR_Error::$backtrace = null
 

Definition at line 673 of file PEAR.php.

PEAR_Error::$code = -1
 

Definition at line 670 of file PEAR.php.

Referenced by PEAR_Error().

PEAR_Error::$error_message_prefix = ''
 

Definition at line 667 of file PEAR.php.

PEAR_Error::$level = E_USER_NOTICE
 

Definition at line 669 of file PEAR.php.

PEAR_Error::$message = ''
 

Definition at line 671 of file PEAR.php.

Referenced by PEAR_Error().

PEAR_Error::$mode = PEAR_ERROR_RETURN
 

Definition at line 668 of file PEAR.php.

Referenced by PEAR_Error().

PEAR_Error::$userinfo = ''
 

Definition at line 672 of file PEAR.php.

Referenced by PEAR_Error().


The documentation for this class was generated from the following file:
Generated on Tue Jun 29 23:40:51 2004 for Mediawiki by doxygen 1.3.7