Class Kimono_Error

Description

error raising, buffering and callback handling

NOTE: Kimono_Error is a Singleton class and must be accessed only through the static function Kimono_Error::Instance()

  • todo: consider the use of debug_backtrace() to track errors more easily

Located in /include/error.php (line 16)


	
			
Method Summary
 Kimono_Error __construct ()
 void __destruct ()
 void ErrorBuffer (mixed $enabled)
 void ErrorLevel (mixed $errorlevel)
 void Instance ()
 void isVisible (mixed $error_level)
 void LastPHPError ([mixed $error = ''], [mixed $file = ''])
 void RaiseError (mixed $errorstring, [mixed $errorlevel = KIMONO_ERRORLEVEL_ERROR], [mixed $facility = KIMONO_LOG_FACILITY_KIMONO])
 void RegisterCallback (mixed $callback)
 void RunCallbacks ([mixed $error_object = NULL])
 void UnregisterCallback (mixed $callback)
Methods
Constructor __construct (line 27)
  • static:
Kimono_Error __construct ()
Destructor __destruct (line 39)

clean out left-over errors from buffer as a safety precaution if script execution dies before the user clears the buffer.

void __destruct ()
ErrorBuffer (line 121)

enable/disable error buffering, NOTE: disabling buffering will immediately empty buffered errors

void ErrorBuffer (mixed $enabled)
ErrorLevel (line 129)
void ErrorLevel (mixed $errorlevel)
Instance (line 48)

initiate Singleton behaviour and return instance

  • static:
void Instance ()
isVisible (line 110)

returns TRUE if error should be shown and FALSE if it shouldn't

  • todo: chicken-in-egg problem
void isVisible (mixed $error_level)
LastPHPError (line 159)

get or set the last php error, used in services code to fetch the last error

void LastPHPError ([mixed $error = ''], [mixed $file = ''])
RaiseError (line 59)

create error and run/buffer it, log errors and warnings

void RaiseError (mixed $errorstring, [mixed $errorlevel = KIMONO_ERRORLEVEL_ERROR], [mixed $facility = KIMONO_LOG_FACILITY_KIMONO])
RegisterCallback (line 137)
  • todo: make it possible to register static class functions
void RegisterCallback (mixed $callback)
RunCallbacks (line 82)

clean out error buffer if it's disabled and contains objects, proceed to output $error_object if set

void RunCallbacks ([mixed $error_object = NULL])
UnregisterCallback (line 145)
void UnregisterCallback (mixed $callback)

Documentation generated on Fri, 8 Apr 2005 18:27:43 +0200 by phpDocumentor 1.3.0RC3