[Pkg-owncloud-commits] [owncloud] 63/457: 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",

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:05:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit ad88a7d53d039207eddc82993920beab26375f62
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Tue May 19 12:35:22 2015 +0200

    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",
---
 lib/private/log/errorhandler.php | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/private/log/errorhandler.php b/lib/private/log/errorhandler.php
index b1b15f1..5e92db3 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list