]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: catch Throwable
authorChristopher Ng <chrng8@gmail.com>
Mon, 31 Jul 2023 19:10:50 +0000 (12:10 -0700)
committerChristopher Ng <chrng8@gmail.com>
Thu, 3 Aug 2023 22:30:11 +0000 (15:30 -0700)
Signed-off-by: Christopher Ng <chrng8@gmail.com>
apps/files_reminders/lib/Service/ReminderService.php

index b24a685e3bcbbd6fc31d93c53d5b24da0cfa6320..ad230474923a1b3f05d088897fab97713381e817 100644 (file)
@@ -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());
                }
        }