XoopsErrorHandler Class Reference

List of all members.

Public Member Functions

 XoopsErrorHandler ()
getInstance ()
 activate ($showErrors=false)
 handleError ($error)
 renderErrors ()

Detailed Description

Error handler class

Author:
Michael van Dam


Member Function Documentation

XoopsErrorHandler::XoopsErrorHandler (  ) 

Constructor

Registers the error handler and shutdown functions. NOTE: when registering an error handler, the setting or 'error_reporting' is ignored and *everything* is trapped.

& XoopsErrorHandler::getInstance (  ) 

Get the (singleton) instance of the error handler

public

XoopsErrorHandler::activate ( showErrors = false  ) 

Activate the error handler

public

Parameters:
boolean $showErrors True if debug mode is on
Returns:
void

XoopsErrorHandler::handleError ( error  ) 

Handle an error

Parameters:
array $error Associative array containing error info public
Returns:
void

XoopsErrorHandler::renderErrors (  ) 

Render the list of errors

NOTE: Unfortunately PHP 'fatal' and 'parse' errors are not trappable. If the server has 'display_errors Off', then the result will be a blank page. It would be nice to print a message 'This page cannot be displayed', but there seems to be no way to print this only when exiting due to a fatal error rather than normal end of page.

Thus, 'trigger_error' should be used to trap problems early and display a meaningful message before a PHP fatal or parse error can occur.

Use CSS Use language? or allow customized message?

public

Returns:
void


The documentation for this class was generated from the following file:
Generated on Thu Nov 2 00:27:25 2006 for XOOPS Cube Legacy by  doxygen 1.5.1