* array( * 'package1' => PEAR_ErrorStack object, * 'package2' => PEAR_ErrorStack object, * ... * ) *
* // global error stack * $global_stack = &PEAR_ErrorStack::singleton('MyPackage'); * // local error stack * $local_stack = new PEAR_ErrorStack('MyPackage'); *
* array( * 'code' => $code, * 'params' => $params, * 'package' => $this->_package, * 'level' => $level, * 'time' => time(), * 'context' => $context, * 'message' => $msg, * //['repackage' => $err] repackaged error array/Exception class * ); *
* $stack->push(ERROR_CODE, 'error', array(), 'server error 500'); *
* array(error code => 'message template',...) *