From: Christopher Ng Date: Mon, 31 Jul 2023 19:10:50 +0000 (-0700) Subject: fix: catch Throwable X-Git-Tag: v28.0.0beta1~601^2~24 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7637bf2ae04d5558b5771b62cd17b6bc7321ba44;p=nextcloud-server.git fix: catch Throwable Signed-off-by: Christopher Ng --- diff --git a/apps/files_reminders/lib/Service/ReminderService.php b/apps/files_reminders/lib/Service/ReminderService.php index b24a685e3bc..ad230474923 100644 --- a/apps/files_reminders/lib/Service/ReminderService.php +++ b/apps/files_reminders/lib/Service/ReminderService.php @@ -28,7 +28,6 @@ namespace OCA\FilesReminders\Service; use DateTime; use DateTimeZone; -use InvalidArgumentException; use OCA\FilesReminders\AppInfo\Application; use OCA\FilesReminders\Db\Reminder; use OCA\FilesReminders\Db\ReminderMapper; @@ -41,6 +40,7 @@ use OCP\IUser; use OCP\IUserManager; use OCP\Notification\IManager as INotificationManager; use Psr\Log\LoggerInterface; +use Throwable; class ReminderService { public function __construct( @@ -113,8 +113,8 @@ class ReminderService { try { $this->notificationManager->notify($notification); $this->reminderMapper->markNotified($reminder); - } catch (InvalidArgumentException $e) { - $this->logger->error('Failed to send reminder notification', $e->getTrace()); + } catch (Throwable $th) { + $this->logger->error($th->getMessage(), $th->getTrace()); } }