aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV/Reminder
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-06-25 11:20:48 +0200
committerJoas Schilling <coding@schilljs.com>2024-06-25 11:56:24 +0200
commit8130968a352bcf66606a076598fa4a58a291bc6d (patch)
treeed7d9c5bfc0d7e1b3c63348f0416d96cb51fb6ef /apps/dav/lib/CalDAV/Reminder
parent9496ce6c7a35f5a6d151b78d78a45b1c900b3b2a (diff)
downloadnextcloud-server-8130968a352bcf66606a076598fa4a58a291bc6d.tar.gz
nextcloud-server-8130968a352bcf66606a076598fa4a58a291bc6d.zip
feat(notifications): Migrate server INotifiers to new exceptions
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav/lib/CalDAV/Reminder')
-rw-r--r--apps/dav/lib/CalDAV/Reminder/Notifier.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/Notifier.php b/apps/dav/lib/CalDAV/Reminder/Notifier.php
index 8863c165be1..f3c784ea21f 100644
--- a/apps/dav/lib/CalDAV/Reminder/Notifier.php
+++ b/apps/dav/lib/CalDAV/Reminder/Notifier.php
@@ -17,6 +17,7 @@ use OCP\L10N\IFactory;
use OCP\Notification\AlreadyProcessedException;
use OCP\Notification\INotification;
use OCP\Notification\INotifier;
+use OCP\Notification\UnknownNotificationException;
/**
* Class Notifier
@@ -78,12 +79,12 @@ class Notifier implements INotifier {
* @param INotification $notification
* @param string $languageCode The code of the language that should be used to prepare the notification
* @return INotification
- * @throws \Exception
+ * @throws UnknownNotificationException
*/
public function prepare(INotification $notification,
string $languageCode):INotification {
if ($notification->getApp() !== Application::APP_ID) {
- throw new \InvalidArgumentException('Notification not from this app');
+ throw new UnknownNotificationException('Notification not from this app');
}
// Read the language from the notification
@@ -95,7 +96,7 @@ class Notifier implements INotifier {
return $this->prepareReminderNotification($notification);
default:
- throw new \InvalidArgumentException('Unknown subject');
+ throw new UnknownNotificationException('Unknown subject');
}
}