PEAR Manual
Prev | Chapter 26. PEAR base classes | Next

# Intelligent Error Handling with PEAR_ErrorStack

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');

Prev | Home | Next
PEAR_Error::toString() | Up | Introduction to using PEAR_ErrorStack for advanced error handling