Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasWiesner committed Feb 15, 2012
1 parent 7327baa commit c25cd46
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions error.php
Expand Up @@ -12,14 +12,19 @@

function myErrorHandler($errno, $errstr, $errfile, $errline) {
global $html;
//echo sprintf($html, print_r(array($errno, $errstr, $errfile, $errline), true));
//die();
if ($errno) {
echo sprintf($html, print_r(array($errno, $errstr, $errfile, $errline), true));
die();
}
}
set_error_handler("myErrorHandler");

function shutDownFunction() {
global $html;
//echo sprintf($html, print_r(error_get_last(), true));
//die();
$error = error_get_last();
if ($error) {
echo sprintf($html, print_r($error, true));
die();
}
}
register_shutdown_function('shutdownFunction');

0 comments on commit c25cd46

Please sign in to comment.