exception class will be logged as well - helps especially in cases where the message contained is empty - e.g. "message":"OCP\\Files\\NotFoundException: at \/home\/deepdiver\/Development\/ownCloud\/core-autotest\/apps\/provisioning_api\/lib\/users.php#354",
This commit is contained in:
parent
5899b7b6ea
commit
ad88a7d53d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue