@@ -55,7 +55,7 @@ public function parse($language, IEvent $event, ?IEvent $previousEvent = null) {
5555 if ($ this ->activityManager ->isFormattingFilteredObject ()) {
5656 try {
5757 return $ this ->parseShortVersion ($ event );
58- } catch (\ InvalidArgumentException $ e ) {
58+ } catch (UnknownActivityException $ e ) {
5959 // Ignore and simply use the long version...
6060 }
6161 }
@@ -66,7 +66,7 @@ public function parse($language, IEvent $event, ?IEvent $previousEvent = null) {
6666 /**
6767 * @param IEvent $event
6868 * @return IEvent
69- * @throws \InvalidArgumentException
69+ * @throws UnknownActivityException
7070 * @since 11.0.0
7171 */
7272 abstract protected function parseShortVersion (IEvent $ event );
@@ -75,14 +75,11 @@ abstract protected function parseShortVersion(IEvent $event);
7575 * @param IEvent $event
7676 * @param IEvent|null $previousEvent
7777 * @return IEvent
78- * @throws \InvalidArgumentException
78+ * @throws UnknownActivityException
7979 * @since 11.0.0
8080 */
8181 abstract protected function parseLongVersion (IEvent $ event , ?IEvent $ previousEvent = null );
8282
83- /**
84- * @throws \InvalidArgumentException
85- */
8683 protected function setSubjects (IEvent $ event , string $ subject , array $ parameters ): void {
8784 $ event ->setRichSubject ($ subject , $ parameters );
8885 }
@@ -91,7 +88,7 @@ protected function setSubjects(IEvent $event, string $subject, array $parameters
9188 * @param array|string $parameter
9289 * @param IEvent|null $event
9390 * @return array
94- * @throws \InvalidArgumentException
91+ * @throws UnknownActivityException
9592 */
9693 protected function getFile ($ parameter , ?IEvent $ event = null ) {
9794 if (is_array ($ parameter )) {
@@ -101,7 +98,7 @@ protected function getFile($parameter, ?IEvent $event = null) {
10198 $ path = $ parameter ;
10299 $ id = (string )$ event ->getObjectId ();
103100 } else {
104- throw new \ InvalidArgumentException ('Could not generate file parameter ' );
101+ throw new UnknownActivityException ('Could not generate file parameter ' );
105102 }
106103
107104 return [
0 commit comments