PHPDevShell 3.1.3-Stable
PHP OOP RAD Development Framework
PHPDS_errorHandler Class Reference
Inheritance diagram for PHPDS_errorHandler:
PHPDS_dependant

Public Member Functions

 construct ()
 getFirePHP ()
 doHandleShutdown ()
 doHandleException (Exception $ex)
 doHandleError ($errno, $errstr, $errfile, $errline)
 conductor ($msg, $level=0, $label= '')
 textualize ($text)
 error_log ($prefix, $data)
 message ($message, $trace= '')
 showException (Exception $e=null)

Static Public Member Functions

static getArgument ($arg)

Data Fields

 $error_backtrace = false

Protected Attributes

 $ignore_notices = false
 $ignore_warnings = false
 $warningsAreFatal = true
 $noticesAreFatal = false
 $serverlog = true
 $file = ''
 $mail = ''
 $display = true
 $firebug = false
 $firephp = null
 $I_give_up = false
 $production = false

Detailed Description

Error handling function with use of FirePHP

Author:
Grzegorz Godlewski redone by Jason Schoeman Error handler class

Member Function Documentation

conductor ( msg,
level = 0,
label = '' 
)
construct ( )

Construtor

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

Reimplemented from PHPDS_dependant.

doHandleError ( errno,
errstr,
errfile,
errline 
)

Error handler

Parameters:
int$errnoError code
string$errstrError message
doHandleException ( Exception $  ex)

Exception handler

Parameters:
Exception$exException
doHandleShutdown ( )

Handle critical errors (if set to)

error_log ( prefix,
data 
)

Write data to the error log using Apache flow

Parameters:
$prefixA string to add at the beginning
$dataAn array of strings to output
Returns:
void
static getArgument ( arg) [static]

Converts variable into short text

Parameters:
mixed$argVariable
Returns:
string
getFirePHP ( )
message ( message,
trace = '' 
)

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

Parameters:
string$message
Returns:
string
showException ( Exception $  e = null)

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

Date:
20100918
Version:
1.0.1
Author:
greg
Parameters:
Exception$e(optional)
textualize ( text)

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

Parameters:
$textthe string to clean
Returns:
$text

Field Documentation

$display = true [protected]
$error_backtrace = false
$file = '' [protected]
$firebug = false [protected]
$firephp = null [protected]
$I_give_up = false [protected]
$ignore_notices = false [protected]

Error handler options

$ignore_warnings = false [protected]
$mail = '' [protected]
$noticesAreFatal = false [protected]
$production = false [protected]
$serverlog = true [protected]
$warningsAreFatal = true [protected]

The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Enumerations