|
@ -19,6 +19,7 @@ class ErrorHandler |
|
|
|
|
|
|
|
|
static public function error_handler($errno, $errstr, $errfile, $errline ) |
|
|
static public function error_handler($errno, $errstr, $errfile, $errline ) |
|
|
{ |
|
|
{ |
|
|
|
|
|
ob_clean(); |
|
|
throw new ErrorException($errstr, 0, $errno, $errfile, $errline); |
|
|
throw new ErrorException($errstr, 0, $errno, $errfile, $errline); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
@ -31,9 +32,9 @@ class ErrorHandler |
|
|
$i++; |
|
|
$i++; |
|
|
if($i >= $hiline - 10 && $i <= $hiline + 10) { |
|
|
if($i >= $hiline - 10 && $i <= $hiline + 10) { |
|
|
if ($i == $hiline) { |
|
|
if ($i == $hiline) { |
|
|
$code[] = '<tr class="error"><th>' . $i . '</th><td><span class="specific">' . $line . '</span></td></tr>'; |
|
|
|
|
|
|
|
|
$code[] = '<tr class="error"><th>' . $i . '</th><td><span class="specific">' . htmlentities($line, ENT_QUOTES, 'UTF-8') . '</span></td></tr>'; |
|
|
}else{ |
|
|
}else{ |
|
|
$code[] = '<tr><th>' . $i . '</th><td>' . $line . '</td></tr>'; |
|
|
|
|
|
|
|
|
$code[] = '<tr><th>' . $i . '</th><td>' . htmlentities($line, ENT_QUOTES, 'UTF-8') . '</td></tr>'; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if($i > $hiline + 10) { |
|
|
if($i > $hiline + 10) { |
|
@ -50,6 +51,7 @@ class ErrorHandler |
|
|
} |
|
|
} |
|
|
$text = '<table class="req"><thead><tr><th>Variable</th><th>Value</th></tr></thead><tbody>'; |
|
|
$text = '<table class="req"><thead><tr><th>Variable</th><th>Value</th></tr></thead><tbody>'; |
|
|
foreach ($array as $key => $value) { |
|
|
foreach ($array as $key => $value) { |
|
|
|
|
|
$value = ($value) ? htmlentities($value, ENT_QUOTES, 'UTF-8') : ' '; |
|
|
$text .= '<tr><td>' . $key . '</td><td class="code"><div>' . $value . '</div></td></tr>'; |
|
|
$text .= '<tr><td>' . $key . '</td><td class="code"><div>' . $value . '</div></td></tr>'; |
|
|
} |
|
|
} |
|
|
$text .= '</tbody></table>'; |
|
|
$text .= '</tbody></table>'; |
|
@ -139,7 +141,6 @@ class ErrorHandler |
|
|
<pre class="exception_value">{$exception->getMessage()}</pre> |
|
|
<pre class="exception_value">{$exception->getMessage()}</pre> |
|
|
<table class="meta"> |
|
|
<table class="meta"> |
|
|
<tbody> |
|
|
<tbody> |
|
|
<tbody> |
|
|
|
|
|
<tr><th>Request Method:</th><td>{$method}</td></tr> |
|
|
<tr><th>Request Method:</th><td>{$method}</td></tr> |
|
|
<tr><th>Exception Type:</th><td>{$class}</td></tr> |
|
|
<tr><th>Exception Type:</th><td>{$class}</td></tr> |
|
|
<tr><th>Exception Message:</th><td><pre>{$exception->getMessage()}</pre></td></tr> |
|
|
<tr><th>Exception Message:</th><td><pre>{$exception->getMessage()}</pre></td></tr> |
|
|