Added an execute() method to context to catch unhandled commands
This commit is contained in:
		@@ -223,6 +223,12 @@ class Shell
 | 
			
		||||
            }
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Call 'execute' on the current context
 | 
			
		||||
        if ($this->context->execute($command, ...$args)) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Throw error if the command could not be found
 | 
			
		||||
        throw new Exception\BadCommandException("Command {$command} not found");
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user