File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8080use Psr \Log \LoggerInterface ;
8181use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
8282use Symfony \Component \EventDispatcher \GenericEvent ;
83+ use Throwable ;
8384
8485class Repair implements IOutput {
8586
@@ -140,9 +141,15 @@ public function addStep($repairStep) {
140141 $ s = \OC ::$ server ->query ($ repairStep );
141142 } catch (QueryException $ e ) {
142143 if (class_exists ($ repairStep )) {
143- $ s = new $ repairStep ();
144+ try {
145+ // Last resort: hope there are no constructor arguments
146+ $ s = new $ repairStep ();
147+ } catch (Throwable $ inner ) {
148+ // Well, it was worth a try
149+ throw new \Exception ("Repair step ' $ repairStep' can't be instantiated: " . $ e ->getMessage (), 0 , $ e );
150+ }
144151 } else {
145- throw new \Exception ("Repair step ' $ repairStep' is unknown " );
152+ throw new \Exception ("Repair step ' $ repairStep' is unknown " , 0 , $ e );
146153 }
147154 }
148155
You can’t perform that action at this time.
0 commit comments