diff options
author | Eudyptula <eitan@mosenkis.net> | 2009-08-04 17:58:55 -0400 |
---|---|---|
committer | Eudyptula <eitan@mosenkis.net> | 2009-08-04 17:58:55 -0400 |
commit | d3da989d3e2d2cb03cdc4bd2e23783f716ef5035 (patch) | |
tree | 2f9f8c413d2800a3f72282dec0f86170a00ff4f6 /frontend/include/error_handling.php | |
parent | Add visibility column to builds, configurations (diff) | |
download | ingenue-d3da989d3e2d2cb03cdc4bd2e23783f716ef5035.tar.gz ingenue-d3da989d3e2d2cb03cdc4bd2e23783f716ef5035.tar.bz2 ingenue-d3da989d3e2d2cb03cdc4bd2e23783f716ef5035.zip |
Widespread cleanup - moved $conf, $death into $S; $S is given as arg to init_x() and body_x(); $request removed in favor of $_REQUEST; query() replaces $S[pdo]->query(); etc.
Diffstat (limited to 'frontend/include/error_handling.php')
-rw-r--r-- | frontend/include/error_handling.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/include/error_handling.php b/frontend/include/error_handling.php index 82f6122..5f616ee 100644 --- a/frontend/include/error_handling.php +++ b/frontend/include/error_handling.php @@ -1,12 +1,12 @@ <?php function exception_handler($e) { - global $death; + global $S; $trace=array(); foreach ($e->getTrace() as $t) { $trace[]='<b>'.$t['function'].'</b>(<b>'.htmlentities(implode(', ', $t['args'])).'</b>) at <b>'.$t['file'].'</b> line <b>'.$t['line'].'</b><br/>'; } $trace=implode(' from<br/>', $trace); - $death.=print_error('Uncaught '.get_class($e).': '.$e->getMessage(), 'Thrown at:<br/>'.$trace); + $S['death'].=print_error('Uncaught '.get_class($e).': '.$e->getMessage(), 'Thrown at:<br/>'.$trace); } set_exception_handler('exception_handler'); // Directly copied from PHP Manual -> Language Reference -> Predefined Exceptions -> ErrorException @@ -14,7 +14,7 @@ function exception_error_handler($errno, $errstr, $errfile, $errline ) { if ((error_reporting() & $errno) == 0) { // Don't report errors that aren't supposed to be reported return; } - global $death; + global $S; $errtypes=array( E_ERROR => 'Fatal Error', E_WARNING => 'Warning', @@ -54,7 +54,7 @@ function exception_error_handler($errno, $errstr, $errfile, $errline ) { } $trace.='from <b>'.(isset($t['function'])?(isset($t['class'])?$t['class'].$t['type']:'').$t['function'].'</b>'.(isset($t['args'])?'(<b>'.htmlentities(implode(', ', $t['args'])).'</b>)':''):(isset($t['args'])?'Included file(s) '.implode(', ', $t['args']):'')).(isset($t['file'])?' at <b>'.$t['file'].'</b>'.(isset($t['line'])?' line <b>'.$t['line'].'</b>':''):'').'<br/>'; } - $death.=print_error($type, $errstr.'<br/>'.$trace); + $S['death'].=print_error($type, $errstr.'<br/>'.$trace); } set_error_handler("exception_error_handler"); ?> |