diff options
Diffstat (limited to 'remote.php')
-rw-r--r-- | remote.php | 8 |
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); } |