summaryrefslogtreecommitdiffstats
path: root/lib/log.php
diff options
context:
space:
mode:
authorVicDeo <victor.dubiniuk@gmail.com>2012-09-26 14:38:06 +0300
committerVicDeo <victor.dubiniuk@gmail.com>2012-09-26 14:38:06 +0300
commit2b6869bcea2b09357a81ddd299969c47e2b79ada (patch)
treedc604579d6e3fcbe008ddea8a6e521f0279b3f32 /lib/log.php
parentbbf8bb0bb3f33c92933dfd499b571f56edda4a59 (diff)
downloadnextcloud-server-2b6869bcea2b09357a81ddd299969c47e2b79ada.tar.gz
nextcloud-server-2b6869bcea2b09357a81ddd299969c47e2b79ada.zip
Uncaught exception logging
Diffstat (limited to 'lib/log.php')
-rw-r--r--lib/log.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/log.php b/lib/log.php
index 9c754cf60ce..17f781fa91c 100644
--- a/lib/log.php
+++ b/lib/log.php
@@ -47,6 +47,11 @@ class OC_Log {
return true;
}
}
+
+ // Uncaught exception handler
+ public static function onException($exception){
+ self::write('PHP', $exception->getMessage() . ' at ' . $exception->getFile() . '#' . $exception->getLine(), self::FATAL);
+ }
//Recoverable errors handler
public static function onError($number, $message, $file, $line){