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

Class: PEAR_Error

Source Location: /pear/PEAR.php

Class Overview


Standard PEAR error class for PHP 4


Author(s):

Version:

  • Release: 1.4.11

Copyright:

  • 1997-2006 The PHP Group

Variables

Methods


Child classes:

HTML_QuickForm_Error
Standard PEAR error class for PHP 4

Class Details

[line 816]
Standard PEAR error class for PHP 4

This class is supserseded by PEAR_Exception in PHP 5




Tags:

author:  Stig Bakken <ssb@php.net>
author:  Tomas V.V. Cox <cox@idecnet.com>
author:  Gregory Beaver <cellog@php.net>
version:  Release: 1.4.11
copyright:  1997-2006 The PHP Group
see:  PEAR::raiseError(), PEAR::throwError()
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


[ Top ]


Class Variables

$backtrace =  null

[line 826]


Type:   mixed


[ Top ]

$code =  -1

[line 823]


Type:   mixed


[ Top ]

$error_message_prefix =  ''

[line 820]


Type:   mixed


[ Top ]

$level =  E_USER_NOTICE

[line 822]


Type:   mixed


[ Top ]

$message =  ''

[line 824]


Type:   mixed


[ Top ]

$mode =  PEAR_ERROR_RETURN

[line 821]


Type:   mixed


[ Top ]

$userinfo =  ''

[line 825]


Type:   mixed


[ Top ]



Class Methods


constructor PEAR_Error [line 851]

PEAR_Error PEAR_Error( [string $message = 'unknown error'], [int $code = null], [int $mode = null], [mixed $options = null], [string $userinfo = null])

PEAR_Error constructor



Tags:

access:  public


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

[ Top ]

method addUserInfo [line 1033]

void addUserInfo( $info)



Parameters:

   $info  

[ Top ]

method getBacktrace [line 1019]

array getBacktrace( [int $frame = null])

Get the call backtrace from where the error was generated.

Supported with PHP 4.3.0 or newer.




Tags:

return:  Backtrace, or NULL if not available.
access:  public


Parameters:

int   $frame   (optional) what frame to fetch

[ Top ]

method getCallback [line 932]

mixed getCallback( )

Get the callback function/method from an error object.



Tags:

return:  callback function or object/method array
access:  public


[ Top ]

method getCode [line 961]

int getCode( )

Get error code from an error object



Tags:

return:  error code
access:  public


[ Top ]

method getDebugInfo [line 1003]

string getDebugInfo( )

Get additional debug information supplied by the application.



Tags:

return:  debug information
access:  public


[ Top ]

method getMessage [line 946]

string getMessage( )

Get the error message from an error object.



Tags:

return:  full error message
access:  public


[ Top ]

method getMode [line 919]

int getMode( )

Get the error mode from an error object.



Tags:

return:  error mode
access:  public


[ Top ]

method getType [line 975]

string getType( )

Get the name of this error/exception.



Tags:

return:  error/exception name (type)
access:  public


[ Top ]

method getUserInfo [line 989]

string getUserInfo( )

Get additional user-supplied information.



Tags:

return:  user-supplied information
access:  public


[ Top ]

method toString [line 1051]

string toString( )

Make a string representation of this object.



Tags:

return:  a string with an object summary
access:  public


[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:51:57 +0100 by phpDocumentor 1.4.3