yana

phpDocumentor v 1.4.0

Class ErrorUtility

Description

«utility» static class for error handling and debugging
This class provides static methods to set the current error reporting level, set the way how errors are reported - wether as text messages on the screen or (hidden from visitors) in log files - and to format and output reported errors.
The center of interest for a common audience should be how to enable or disable error reporting for debug purposes.
  • access: public
  • name: ErrorUtility
Utility
   |
   --ErrorUtility
Method Summary

Methods

debug breakpoint
void breakpoint ()
Description:
This is a debugging function that allows to use "de facto" breakpoints without the need of an extra debugger. It creates and outputs a debug backtrace and dumps any vars you pass to it.
Note: calling this function exists the program.
Example of usage:
  1.  // ... some code here
  2.  ErrorUtility::breakpoint($foo$bar);
  3.  // more code here ...
  • access: public
Set error reporting level
void setErrorReporting (
integer|string $errorLevel
)
List of parameters:
Name Type Description
$errorLevel integer|string examples: YANA_ERROR_OFF, YANA_ERROR_LOG, YANA_ERROR_ON or E_ALL, E_ALL & ~E_NOTICE
Description:
You may use the following constants:
  1. YANA_ERROR_ON = catch all errors and print to screen
  2. YANA_ERROR_OFF = do not report any errors or messages
  3. YANA_ERROR_LOG = write errors and messages to a log file
  • access: public
  • name: ErrorUtility::setErrorReporting()
  • uses: ErrorUtility::setErrorReporting(YANA_ERROR_OFF)
inherited from base classes

Inherited From Utility

Documentation generated on Sat, 03 Jan 2009 22:22:23 +0100 by phpDocumentor 1.4.0

yana author: Thomas MeyerHomepage: www.yanaframework.net