6 * Errors are similar to exceptions in PHP5 but without some cool tricks
7 * that build in error handling provides.
10 * @subpackage Base classes
12 * @http://www.projectpier.org/
14 class Error
extends Exception
{
17 * Return error params (name -> value pairs). General params are file and line
18 * and any specific error have their own params...
24 function getParams() {
26 // Prepare base params...
28 'file' => $this->getFile(),
29 'line' => $this->getLine()
32 // Get additional params...
33 $additional = $this->getAdditionalParams();
35 // And return (join if we have additional params)
36 return is_array($additional) ?
array_merge($base, $additional) : $base;
41 * Return additional error params
47 function getAdditionalParams() {
49 } // getAdditionalParams