File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
src/Infrastructure/Messenger Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,12 @@ public function dispatch(Command $command): mixed
25
25
return $ this ->handle ($ command );
26
26
} catch (HandlerFailedException $ e ) {
27
27
$ exceptions = $ e ->getWrappedExceptions ();
28
- throw $ exceptions [0 ];
28
+ $ first = array_shift ($ exceptions );
29
+ if ($ first ) {
30
+ throw $ first ;
31
+ }
32
+
33
+ throw $ e ;
29
34
}
30
35
}
31
36
}
Original file line number Diff line number Diff line change @@ -25,7 +25,12 @@ public function dispatch(Query $query): mixed
25
25
return $ this ->handle ($ query );
26
26
} catch (HandlerFailedException $ e ) {
27
27
$ exceptions = $ e ->getWrappedExceptions ();
28
- throw $ exceptions [0 ];
28
+ $ first = array_shift ($ exceptions );
29
+ if ($ first ) {
30
+ throw $ first ;
31
+ }
32
+
33
+ throw $ e ;
29
34
}
30
35
}
31
36
}
You can’t perform that action at this time.
0 commit comments