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 is an experimental error raising and handling implementation for PEAR that is designed to replace PEAR_Error when it has stabilized. PEAR_ErrorStack is both backwards compatible with PEAR_Error and forward compatible with PHP 5's Exception class. There are many other features, all described in the Introduction.
Usage:
1 // global error stack 2 $global_stack = &PEAR_ErrorStack::singleton('MyPackage'); 3 // local error stack 4 $local_stack = new PEAR_ErrorStack('MyPackage');
Introduction to using PEAR_ErrorStack for advanced error handling
Who's Online
Guest Users: 10
Free Sample Chapters
Deliver First Class Web Sites: 101 Essential Checklists Want to learn how to make your web sites usable and accessible? Want to ensure that your sites meet current best practice, without spending hours trawling through incomprehensible specifications and recommendations from dozens of different books, research papers, and web sites? Want to make sure that the sites you build are "right the first time," requiring no costly redevelopments?