File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 7979use  OCP \Migration \IRepairStep ;
8080use  Symfony \Component \EventDispatcher \EventDispatcherInterface ;
8181use  Symfony \Component \EventDispatcher \GenericEvent ;
82+ use  Throwable ;
8283
8384class  Repair implements  IOutput {
8485
@@ -131,9 +132,15 @@ public function addStep($repairStep) {
131132				$ sOC ::$ serverquery ($ repairStep
132133			} catch  (QueryException $ e
133134				if  (class_exists ($ repairStep
134- 					$ snew  $ repairStep
135+ 					try  {
136+ 						// Last resort: hope there are no constructor arguments 
137+ 						$ snew  $ repairStep
138+ 					} catch  (Throwable $ inner
139+ 						// Well, it was worth a try 
140+ 						throw  new  \Exception ("Repair step ' $ repairStep' can't be instantiated:  "  . $ egetMessage (), 0 , $ e
141+ 					}
135142				} else  {
136- 					throw  new  \Exception ("Repair step ' $ repairStep' is unknown " );
143+ 					throw  new  \Exception ("Repair step ' $ repairStep' is unknown " ,  0 ,  $ e 
137144				}
138145			}
139146
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments