phpDocumentor PEAR
[ class tree: PEAR ] [ index: PEAR ] [ all elements ]

Class: PEAR_Error

Source Location: /PEAR.php

Class PEAR_Error

Class Overview

Standard PEAR error class for PHP 4

This class is supserseded by PEAR_Exception in PHP 5

Located in /PEAR.php [line 822]



		
				Author(s):
		
		
		API Tags:
See:  PEAR::raiseError(), PEAR::throwError()

Information Tags:
Version:  Release: 1.6.2
Copyright:  1997-2006 The PHP Group
Link:  http://pear.php.net/manual/en/core.pear.pear-error.php
Since:  Class available since PHP 4.0.2
License:  PHP License 3.0

Properties

Methods

[ Top ]
Property Summary
mixed   $backtrace  
mixed   $code  
mixed   $error_message_prefix  
mixed   $level  
mixed   $message  
mixed   $mode  
mixed   $userinfo  

[ Top ]
Method Summary
PEAR_Error   PEAR_Error()   PEAR_Error constructor
void   addUserInfo()  
array   getBacktrace()   Get the call backtrace from where the error was generated.
mixed   getCallback()   Get the callback function/method from an error object.
int   getCode()   Get error code from an error object
string   getDebugInfo()   Get additional debug information supplied by the application.
string   getMessage()   Get the error message from an error object.
int   getMode()   Get the error mode from an error object.
string   getType()   Get the name of this error/exception.
string   getUserInfo()   Get additional user-supplied information.
string   toString()   Make a string representation of this object.

[ Top ]
Properties
mixed   $backtrace = null [line 832]

[ Top ]
mixed   $code = -1 [line 829]

[ Top ]
mixed   $error_message_prefix = '' [line 826]

[ Top ]
mixed   $level = E_USER_NOTICE [line 828]

[ Top ]
mixed   $message = '' [line 830]

[ Top ]
mixed   $mode = PEAR_ERROR_RETURN [line 827]

[ Top ]
mixed   $userinfo = '' [line 831]

[ Top ]
Methods
Constructor PEAR_Error  [line 857]

  PEAR_Error PEAR_Error( [string $message = 'unknown error'], [int $code = null], [int $mode = null], [mixed $options = null], [string $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, 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

API Tags:
Access:  public


[ Top ]
addUserInfo  [line 1040]

  void addUserInfo( $info  )

Parameters:
   $info: 


[ Top ]
getBacktrace  [line 1026]

  array getBacktrace( [int $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

API Tags:
Return:  Backtrace, or NULL if not available.
Access:  public


[ Top ]
getCallback  [line 939]

  mixed getCallback( )

Get the callback function/method from an error object.


API Tags:
Return:  callback function or object/method array
Access:  public


[ Top ]
getCode  [line 968]

  int getCode( )

Get error code from an error object


API Tags:
Return:  error code
Access:  public


[ Top ]
getDebugInfo  [line 1010]

  string getDebugInfo( )

Get additional debug information supplied by the application.


API Tags:
Return:  debug information
Access:  public


[ Top ]
getMessage  [line 953]

  string getMessage( )

Get the error message from an error object.


API Tags:
Return:  full error message
Access:  public


[ Top ]
getMode  [line 926]

  int getMode( )

Get the error mode from an error object.


API Tags:
Return:  error mode
Access:  public


[ Top ]
getType  [line 982]

  string getType( )

Get the name of this error/exception.


API Tags:
Return:  error/exception name (type)
Access:  public


[ Top ]
getUserInfo  [line 996]

  string getUserInfo( )

Get additional user-supplied information.


API Tags:
Return:  user-supplied information
Access:  public


[ Top ]
toString  [line 1058]

  string toString( )

Make a string representation of this object.


API Tags:
Return:  a string with an object summary
Access:  public


[ Top ]

Documentation generated on Fri, 26 Dec 2008 21:44:49 -0500 by phpDocumentor 1.4.2