File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/PHPCR/Shell/Subscriber Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 6
6
use PHPCR \Shell \Event \CommandExceptionEvent ;
7
7
use Symfony \Component \EventDispatcher \EventSubscriberInterface ;
8
8
use PHPCR \Shell \Event \PhpcrShellEvents ;
9
+ use PHPCR \UnsupportedRepositoryOperationException ;
9
10
10
11
/**
11
12
* Try and better handle exceptions
@@ -26,6 +27,10 @@ public function handleException(CommandExceptionEvent $event)
26
27
$ exception = $ event ->getException ();
27
28
$ output = $ event ->getOutput ();
28
29
30
+ if ($ exception instanceof UnsupportedRepositoryOperationException) {
31
+ $ output ->writeln ('<error>Unsupported repository operation: This repository is not capable of performing the requested action</error> ' );
32
+ }
33
+
29
34
if ($ exception instanceof NotImplementedException) {
30
35
$ output ->writeln ('<error>Not implemented: ' . $ exception ->getMessage () . '</error> ' );
31
36
}
You can’t perform that action at this time.
0 commit comments