summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/log/errorhandler.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/private/log/errorhandler.php b/lib/private/log/errorhandler.php
index b1b15f12ed7..5e92db398f9 100644
--- a/lib/private/log/errorhandler.php
+++ b/lib/private/log/errorhandler.php
@@ -64,10 +64,16 @@ class ErrorHandler {
}
}
- // Uncaught exception handler
+ /**
+ * Uncaught exception handler
+ *
+ * @param \Exception $exception
+ */
public static function onException($exception) {
- $msg = $exception->getMessage() . ' at ' . $exception->getFile() . '#' . $exception->getLine();
- self::$logger->critical(self::removePassword($msg), array('app' => 'PHP'));
+ $class = get_class($exception);
+ $msg = $exception->getMessage();
+ $msg = "$class: $msg at " . $exception->getFile() . '#' . $exception->getLine();
+ self::$logger->critical(self::removePassword($msg), ['app' => 'PHP']);
}
//Recoverable errors handler