PEAR_Error::toString() (Previous) (Next) Introduction to using PEAR_ErrorStack for advanced error handling

View this page in Last updated: Mon, 02 Jul 2007
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

PEAR_ErrorStack

Spis treści
Introduction to using PEAR_ErrorStack for advanced error handling --  Using PEAR_ErrorStack to do both simple and advanced error handling
constructor PEAR_ErrorStack::PEAR_ErrorStack() -- Set up a new error stack instance
PEAR_ErrorStack::getErrorMessage() -- Standard error message generation callback
PEAR_ErrorStack::getErrorMessageTemplate() -- Standard Error Message Template generator from error code
PEAR_ErrorStack::getErrors() -- Retrieve all errors since last purge
PEAR_ErrorStack::getFileLine() -- Standard file/line number/function/class context callback
PEAR_ErrorStack::getMessageCallback() -- Get an error code => error message mapping callback
PEAR_ErrorStack::hasErrors() -- Determine whether there are any errors on the stack
PEAR_ErrorStack::pop() -- Pop an error off of the error stack
PEAR_ErrorStack::popCallback() -- Remove a callback from the error callback stack
PEAR_ErrorStack::push() -- Add an error to the stack
PEAR_ErrorStack::pushCallback() -- Set an error Callback If set to a valid callback, this will be called every time an error is pushed onto the stack. The return value will be used to determine whether to allow an error to be pushed or logged.
PEAR_ErrorStack::raiseError() -- emulate PEAR::raiseError()
PEAR_ErrorStack::setContextCallback() --  Set a callback that generates context information (location of error) for an error stack
PEAR_ErrorStack::setDefaultCallback() --  Sets a default callback to be used by all error stacks
PEAR_ErrorStack::setDefaultLogger() --  Set up a PEAR::Log object for all error stacks that don't have one
PEAR_ErrorStack::setErrorMessageTemplate() -- Set the Error Message Template array
PEAR_ErrorStack::setLogger() --  Set up a PEAR::Log object for this error stack
PEAR_ErrorStack::setMessageCallback() --  Set an error code => error message mapping callback
PEAR_ErrorStack::singleton() -- Return a single error stack for this package.
PEAR_ErrorStack::staticGetErrors() --  Get a list of all errors since last purge, organized by package
PEAR_ErrorStack::staticHasErrors() --  Determine whether there are any errors on any error stack
PEAR_ErrorStack::staticPop() --  Static version of pop()
PEAR_ErrorStack::staticPopCallback() -- Remove a callback from every error callback stack
PEAR_ErrorStack::staticPush() --  Static version of push()
PEAR_ErrorStack::staticPushCallback() --  Set an error Callback for every package's error stack
PEAR_ErrorStack::_log() -- Log an error using PEAR::Log
Package PEAR_ErrorStack Constants -- Constants defined in and used by PEAR_ErrorStack

PEAR_ErrorStack jest eksperymentalną implementacją obsługi błędów, która została zaprojektowana w celu zastąpienia PEAR_Error jak tylko zostanie ustabilizowana. PEAR_ErrorStack jest w kompatybilna wstecz z PEAR_Error oraz kompatybilna wprzód z klasą wyjątków PHP 5 PEAR_Exception. Większość możliwości tej klasy można przeczytać we Wstępie.

Użycie:

1      // globalny stos błędów
2      $global_stack = &PEAR_ErrorStack::singleton('MyPackage');
3      // lokalny stos błędów
4      $local_stack = new PEAR_ErrorStack('MyPackage');

PEAR_Error::toString() (Previous) (Next) Introduction to using PEAR_ErrorStack for advanced error handling

Download Documentation Last updated: Mon, 02 Jul 2007
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.