diff options
author | Joas Schilling <coding@schilljs.com> | 2024-06-25 11:20:48 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-06-25 11:56:24 +0200 |
commit | 8130968a352bcf66606a076598fa4a58a291bc6d (patch) | |
tree | ed7d9c5bfc0d7e1b3c63348f0416d96cb51fb6ef /core | |
parent | 9496ce6c7a35f5a6d151b78d78a45b1c900b3b2a (diff) | |
download | nextcloud-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 'core')
-rw-r--r-- | core/Notification/CoreNotifier.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/Notification/CoreNotifier.php b/core/Notification/CoreNotifier.php index dfe48286432..83a86513e03 100644 --- a/core/Notification/CoreNotifier.php +++ b/core/Notification/CoreNotifier.php @@ -14,6 +14,7 @@ use OCP\L10N\IFactory; use OCP\Notification\IAction; use OCP\Notification\INotification; use OCP\Notification\INotifier; +use OCP\Notification\UnknownNotificationException; class CoreNotifier implements INotifier { public function __construct( @@ -45,7 +46,7 @@ class CoreNotifier implements INotifier { public function prepare(INotification $notification, string $languageCode): INotification { if ($notification->getApp() !== 'core') { - throw new \InvalidArgumentException(); + throw new UnknownNotificationException(); } $l = $this->factory->get('core', $languageCode); @@ -71,6 +72,6 @@ class CoreNotifier implements INotifier { return $notification; } - throw new \InvalidArgumentException('Invalid subject'); + throw new UnknownNotificationException('Invalid subject'); } } |