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

Class: PEAR_Error

Source Location: /PEAR-1.10.12/PEAR.php

Class Overview


Standard PEAR error class for PHP 4


Author(s):

Version:

  • Release: 1.10.12

Copyright:

  • 1997-2006 The PHP Group

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 853]
Standard PEAR error class for PHP 4

This class is supserseded by PEAR_Exception in PHP 5



[ Top ]


Class Variables

$backtrace =  null

[line 861]


Type:   mixed


[ Top ]

$code =  -1

[line 858]


Type:   mixed


[ Top ]

$error_message_prefix =  ''

[line 855]


Type:   mixed


[ Top ]

$level =  E_USER_NOTICE

[line 857]


Type:   mixed


[ Top ]

$message =  ''

[line 859]


Type:   mixed


[ Top ]

$mode =  PEAR_ERROR_RETURN

[line 856]


Type:   mixed


[ Top ]

$userinfo =  ''

[line 860]


Type:   mixed


[ Top ]



Method Detail

PEAR_Error (Constructor)   [line 964]

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

Only here for backwards compatibility.

Class "Cache_Error" still uses it, among others.

  • Access: public

Parameters:

string   $message   —  Message
int   $code   —  Error code
int   $mode   —  Error mode
mixed   $options   —  See __construct()
string   $userinfo   —  Additional user/debug info

[ Top ]

__construct (Constructor)   [line 883]

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

PEAR_Error constructor
  • 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 ]

addUserInfo   [line 1067]

void addUserInfo( $info)


Parameters:

   $info   — 

[ Top ]

getBacktrace   [line 1056]

array getBacktrace( [int $frame = null])

Get the call backtrace from where the error was generated.

Supported with PHP 4.3.0 or newer.

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

Parameters:

int   $frame   —  (optional) what frame to fetch

[ Top ]

getCallback   [line 988]

mixed getCallback( )

Get the callback function/method from an error object.
  • Return: callback function or object/method array
  • Access: public

[ Top ]

getCode   [line 1010]

int getCode( )

Get error code from an error object
  • Return: error code
  • Access: public

[ Top ]

getDebugInfo   [line 1043]

string getDebugInfo( )

Get additional debug information supplied by the application.
  • Return: debug information
  • Access: public

[ Top ]

getMessage   [line 999]

string getMessage( )

Get the error message from an error object.
  • Return: full error message
  • Access: public

[ Top ]

getMode   [line 977]

int getMode( )

Get the error mode from an error object.
  • Return: error mode
  • Access: public

[ Top ]

getType   [line 1021]

string getType( )

Get the name of this error/exception.
  • Return: error/exception name (type)
  • Access: public

[ Top ]

getUserInfo   [line 1032]

string getUserInfo( )

Get additional user-supplied information.
  • Return: user-supplied information
  • Access: public

[ Top ]

toString   [line 1087]

string toString( )

Make a string representation of this object.
  • Return: a string with an object summary
  • Access: public

[ Top ]

__toString   [line 1076]

void __toString( )


[ Top ]


Documentation generated on Sun, 19 Apr 2020 14:22:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.