From: Christopher Ng Date: Mon, 31 Jul 2023 19:10:50 +0000 (-0700) Subject: fix: remove throwable handling X-Git-Tag: v28.0.0beta1~601^2~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7daf11f8f69cc7562bc46285b9eb4952b6f73b8b;p=nextcloud-server.git fix: remove throwable handling Signed-off-by: Christopher Ng --- diff --git a/apps/files_reminders/lib/BackgroundJob/ScheduledNotifications.php b/apps/files_reminders/lib/BackgroundJob/ScheduledNotifications.php index df801cea063..17b4c902029 100644 --- a/apps/files_reminders/lib/BackgroundJob/ScheduledNotifications.php +++ b/apps/files_reminders/lib/BackgroundJob/ScheduledNotifications.php @@ -32,7 +32,6 @@ use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\Job; use Psr\Log\LoggerInterface; -use Throwable; class ScheduledNotifications extends Job { public function __construct( @@ -54,8 +53,6 @@ class ScheduledNotifications extends Job { $this->reminderService->send($reminder); } catch (DoesNotExistException $e) { $this->logger->debug('Could not send notification for reminder with id ' . $reminder->getId()); - } catch (Throwable $th) { - $this->logger->error($th->getMessage(), $th->getTrace()); } } } diff --git a/apps/files_reminders/lib/Controller/ApiController.php b/apps/files_reminders/lib/Controller/ApiController.php index af5cc1b32a7..a0dbd840111 100644 --- a/apps/files_reminders/lib/Controller/ApiController.php +++ b/apps/files_reminders/lib/Controller/ApiController.php @@ -39,7 +39,6 @@ use OCP\AppFramework\OCSController; use OCP\IRequest; use OCP\IUserSession; use Psr\Log\LoggerInterface; -use Throwable; class ApiController extends OCSController { public function __construct( @@ -72,9 +71,6 @@ class ApiController extends OCSController { 'dueDate' => null, ]; return new DataResponse($reminderData, Http::STATUS_OK); - } catch (Throwable $th) { - $this->logger->error($th->getMessage(), ['exception' => $th]); - return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); } } @@ -104,9 +100,6 @@ class ApiController extends OCSController { return new DataResponse([], Http::STATUS_OK); } catch (NodeNotFoundException $e) { return new DataResponse([], Http::STATUS_NOT_FOUND); - } catch (Throwable $th) { - $this->logger->error($th->getMessage(), ['exception' => $th]); - return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); } } @@ -124,9 +117,6 @@ class ApiController extends OCSController { return new DataResponse([], Http::STATUS_OK); } catch (DoesNotExistException $e) { return new DataResponse([], Http::STATUS_NOT_FOUND); - } catch (Throwable $th) { - $this->logger->error($th->getMessage(), ['exception' => $th]); - return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); } } }