Class PHPDS_errorHandler

Description

Error handler class

  • author: greg
  • version: 1.0.2 (greg)

Located in /PHPDS_errorHandler.class.php (line 24)

PHPDS_dependant
   |
   --PHPDS_errorHandler
Variable Summary
Method Summary
static string getArgument (mixed $arg)
void conductor ( $msg, [ $level = 0], [ $label = ''])
void construct ()
void doHandleError (int $errno, string $errstr,  $errfile,  $errline)
void doHandleException ( $ex)
void error_log ($prefix $prefix, $data $data)
void getFirePHP ()
string message (string $message, [ $trace = ''])
void showException ([ $e = null])
$text textualize ($text $text)
Variables
mixed $display = true (line 38)
  • access: protected
mixed $error_backtrace = false (line 45)
  • access: public
mixed $file = '' (line 36)
  • access: protected
mixed $firebug = false (line 39)
  • access: protected
mixed $firephp = null (line 40)
  • access: protected
mixed $ignore_notices = false (line 30)

Error handler options

  • access: protected
mixed $ignore_warnings = false (line 31)
  • access: protected
mixed $I_give_up = false (line 42)
  • access: protected
mixed $mail = '' (line 37)
  • access: protected
mixed $noticesAreFatal = false (line 33)
  • access: protected
mixed $production = false (line 43)
  • access: protected
mixed $serverlog = true (line 35)
  • access: protected
mixed $warningsAreFatal = true (line 32)
  • access: protected

Inherited Variables

Inherited from PHPDS_dependant

PHPDS_dependant::$dependance
PHPDS_dependant::$parent
Methods
static method getArgument (line 327)

Converts variable into short text

  • access: public
static string getArgument (mixed $arg)
  • mixed $arg: Variable
conductor (line 229)
  • access: public
void conductor ( $msg, [ $level = 0], [ $label = ''])
  • $msg
  • $level
  • $label
construct (line 57)

Construtor

  • version: 1.0.3
  • date: 20110808 (v1.0.3) (greg) don't do anything if we're running embedded (for example unit testing)
  • date: 20100402 (v1.0.1) (greg) fix a typo regarding firephp config field
  • date: 20100927 (v1.0.2) (greg) using the new constructor
  • access: public
void construct ()

Redefinition of:
PHPDS_dependant::construct()
Empty function called by the actual constructor; meant to be overriden
doHandleError (line 202)

Error handler

  • access: public
void doHandleError (int $errno, string $errstr,  $errfile,  $errline)
  • int $errno: Error code
  • string $errstr: Error message
  • $errfile
  • $errline
doHandleException (line 129)

Exception handler

  • access: public
void doHandleException ( $ex)
  • Exception $ex: Exception
doHandleShutdown (line 113)

Handle critical errors (if set to)

  • access: public
void doHandleShutdown ()
error_log (line 315)

Write data to the error log using Apache flow

void error_log ($prefix $prefix, $data $data)
  • $prefix $prefix: A string to add at the beginning
  • $data $data: An array of strings to output
getFirePHP (line 105)
  • access: public
void getFirePHP ()
message (line 351)

Quick independent message styling, just to make it look better yea.

  • access: public
string message (string $message, [ $trace = ''])
  • string $message
  • $trace
showException (line 372)

Display an Exception

This function will load a predefined template page (in PHP form) in order to warn the user something has gone wrong.

If an exception is provided, it will be detailed as much as possible ; if not, only a generic message will be displayed

  • author: greg
  • version: 1.0.1
  • date: 20100918
  • access: public
void showException ([ $e = null])
  • Exception $e: (optional)
textualize (line 302)

Cleans a string for outputing on plain text devices (such as log files)

$text textualize ($text $text)
  • $text $text: the string to clean

Inherited Methods

Inherited From PHPDS_dependant

PHPDS_dependant::__construct()
PHPDS_dependant::construct()
PHPDS_dependant::debugInstance()
PHPDS_dependant::factory()
PHPDS_dependant::factoryWith()
PHPDS_dependant::info()
PHPDS_dependant::log()
PHPDS_dependant::PHPDS_dependance()
PHPDS_dependant::_log()
PHPDS_dependant::__call()
PHPDS_dependant::__get()
PHPDS_dependant::__set()

Documentation generated on Tue, 09 Aug 2011 09:05:11 +0200 by phpDocumentor 1.4.3