aboutsummaryrefslogtreecommitdiffstats
path: root/remote.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-04-20 18:01:47 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-04-20 18:01:47 +0200
commit6a6fc742dc736875a9d0a2be6891ba0fc635f1dc (patch)
tree2f559b670be9f312e14e58de8879189ecccef01f /remote.php
parent069af51dd039fe9790b420b0e74289309a4952c4 (diff)
downloadnextcloud-server-6a6fc742dc736875a9d0a2be6891ba0fc635f1dc.tar.gz
nextcloud-server-6a6fc742dc736875a9d0a2be6891ba0fc635f1dc.zip
Catch class Error on all root entrypoints
Diffstat (limited to 'remote.php')
-rw-r--r--remote.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/remote.php b/remote.php
index 814286860af..991ca0d2302 100644
--- a/remote.php
+++ b/remote.php
@@ -40,9 +40,9 @@ class RemoteException extends Exception {
}
/**
- * @param Exception $e
+ * @param Exception | Error $e
*/
-function handleException(Exception $e) {
+function handleException($e) {
$request = \OC::$server->getRequest();
// in case the request content type is text/xml - we assume it's a WebDAV request
$isXmlContentType = strpos($request->getHeader('Content-Type'), 'text/xml');
@@ -77,7 +77,7 @@ function handleException(Exception $e) {
OC_Response::setStatus($e->getCode());
OC_Template::printErrorPage($e->getMessage());
} else {
- \OCP\Util::writeLog('remote', $e->getMessage(), \OCP\Util::FATAL);
+ \OC::$server->getLogger()->logException($e, ['app' => 'remote']);
OC_Response::setStatus($statusCode);
OC_Template::printExceptionErrorPage($e);
}
@@ -165,4 +165,6 @@ try {
} catch (Exception $ex) {
handleException($ex);
+} catch (Error $e) {
+ handleException($ex);
}