From 039230d8e640847f874fdc6fb727ec1d37ccac5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Mon, 1 Jul 2019 14:21:06 +0200 Subject: [PATCH] Use Throwable as tyoe hint in the exception callback --- apps/dav/lib/Connector/Sabre/FilesPlugin.php | 4 ++-- apps/dav/lib/Files/BrowserErrorPagePlugin.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index b3d2112b3e49..a4986711fd53 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -195,9 +195,9 @@ public function checkMove($source, $destination) { /** * This sets a cookie to be able to recognize the failure of the download * - * @param \Exception $ex + * @param \Throwable $ex */ - public function handleDownloadFailure(\Exception $ex) { + public function handleDownloadFailure(\Throwable $ex) { $queryParams = $this->server->httpRequest->getQueryParameters(); if (isset($queryParams['downloadStartSecret'])) { diff --git a/apps/dav/lib/Files/BrowserErrorPagePlugin.php b/apps/dav/lib/Files/BrowserErrorPagePlugin.php index 198c51005516..a7e8635de037 100644 --- a/apps/dav/lib/Files/BrowserErrorPagePlugin.php +++ b/apps/dav/lib/Files/BrowserErrorPagePlugin.php @@ -68,9 +68,9 @@ public static function isBrowserRequest(IRequest $request) { } /** - * @param \Exception $ex + * @param \Throwable $ex */ - public function logException(\Exception $ex) { + public function logException(\Throwable $ex) { if ($ex instanceof Exception) { $httpCode = $ex->getHTTPCode(); $headers = $ex->getHTTPHeaders($this->server); @@ -88,10 +88,10 @@ public function logException(\Exception $ex) { /** * @codeCoverageIgnore - * @param \Exception $ex + * @param \Throwable $ex * @return bool|string */ - public function generateBody(\Exception $ex) { + public function generateBody(\Throwable $ex) { $request = \OC::$server->getRequest(); $content = new OC_Template('dav', 'exception', 'guest'); $content->assign('title', $this->server->httpResponse->getStatusText());