summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-05-31 10:44:26 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-31 10:44:26 +0200
commitd5e5051029885f2ccc2a81356d54d76d65ac2aec (patch)
tree5be212ea0735f477ef738543144dd49b993e8e74
parent3281db65cafe150fbe26606ce6b5bd63da87f8a4 (diff)
Display error id when printing exception
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--index.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/index.php b/index.php
index 9f68db123..e3e06323a 100644
--- a/index.php
+++ b/index.php
@@ -259,6 +259,9 @@ function _log_exception($ex)
foreach ($exceptions as $key => $e) {
$message = sprintf("Exception %d/%d '%s' with message '%s' in %s:%d\n", $key+1, count($exceptions), get_class($e), $e->getMessage(), $e->getFile(), $e->getLine());
+ if (method_exists($e, "get_error_id")) {
+ $message .= 'Error ID: '.$e->get_error_id()."\n";
+ }
if (method_exists($e, "get_data") && $e->get_data() !== NULL) {
$message .= 'Data: '.var_export($e->get_data(), true)."\n";
}
@@ -294,6 +297,9 @@ function _actual_exception_handler($ex)
$message .= '<b>Exception '.($key+1).' of '.count($exceptions).'</b><br>';
$message .= '<b>Fatal error</b>: Uncaught exception '.htmlspecialchars(get_class($e)).'<br>';
$message .= '<b>Message</b>: '.htmlspecialchars($e->getMessage()).'<br>';
+ if (method_exists($e, "get_error_id")) {
+ $message .= '<b>Error ID</b>: '.htmlspecialchars($e->get_error_id()).'<br>';
+ }
if (method_exists($e, "get_data") && $e->get_data() !== NULL) {
$message .= '<b>Data</b>: <pre>'.htmlspecialchars(var_export($e->get_data(), true)).'</pre><br>';
}