Class SGL_ErrorHandler

Description

Global error handler class, modifies behaviour for PHP errors, not PEAR.

Located in /SGL/ErrorHandler.php (line 53)


	
			
Variable Summary
Method Summary
 void errHandler (int $errNo, string $errStr, string $file, int $line, string $context)
 void startHandler ()
 string _getSourceContext (string $file, int $line, string $context)
Variables
mixed $errorType = array() (line 55)
mixed $sourceContextOptions = array() (line 56)
Methods
Constructor SGL_ErrorHandler (line 64)

Constructor.

  • access: public
void SGL_ErrorHandler ()
errHandler (line 129)

Enhances PHP's default error handling.

  • overrides notices in certain cases
  • obeys @muffled errors,
  • error logged to selected target
  • context info presented for developer
  • error data emailed to admin if threshold passed

  • access: public
void errHandler (int $errNo, string $errStr, string $file, int $line, string $context)
  • int $errNo: PHP's error number
  • string $errStr: PHP's error message
  • string $file: filename where error occurred
  • int $line: line number where error occurred
  • string $context: contextual info
startHandler (line 94)

BC hack to assign custom error handler in a method.

  • access: public
void startHandler ()
_getSourceContext (line 239)

Provides enhanced error info for developer.

Gives 10 lines before and after error occurred, hightlight erroroneous line in red.

  • return: contextual error info
  • access: private
string _getSourceContext (string $file, int $line, string $context)
  • string $file: filename where error occurred
  • int $line: line number where error occurred
  • string $context: contextual info

Documentation generated on Tue, 23 Feb 2010 18:14:30 +0000 by phpDocumentor 1.4.3