File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313namespace OCA \Google \Notification ;
1414
15- use InvalidArgumentException ;
1615use OCA \Google \AppInfo \Application ;
1716use OCP \IURLGenerator ;
1817use OCP \L10N \IFactory ;
1918use OCP \Notification \INotification ;
2019use OCP \Notification \INotifier ;
20+ use OCP \Notification \UnknownNotificationException ;
2121
2222class Notifier implements INotifier {
2323
@@ -50,13 +50,13 @@ public function getName(): string {
5050 * @param INotification $notification
5151 * @param string $languageCode The code of the language that should be used to prepare the notification
5252 * @return INotification
53- * @throws InvalidArgumentException When the notification was not prepared by a notifier
53+ * @throws UnknownNotificationException When the notification was not prepared by a notifier
5454 * @since 9.0.0
5555 */
5656 public function prepare (INotification $ notification , string $ languageCode ): INotification {
5757 if ($ notification ->getApp () !== 'integration_google ' ) {
5858 // Not my app => throw
59- throw new InvalidArgumentException ();
59+ throw new UnknownNotificationException ();
6060 }
6161
6262 $ l = $ this ->factory ->get ('integration_google ' , $ languageCode );
@@ -88,7 +88,7 @@ public function prepare(INotification $notification, string $languageCode): INot
8888
8989 default :
9090 // Unknown subject => Unknown notification => throw
91- throw new InvalidArgumentException ();
91+ throw new UnknownNotificationException ();
9292 }
9393 }
9494}
You can’t perform that action at this time.
0 commit comments