trapErrors() публичный Метод

public trapErrors ( boolean $trap = true ) : Command
$trap boolean when true, exceptions will be caught by Commando and printed cleanly to standard error.
Результат Command
Пример #1
0
 /**
  * Test that an exception is thrown when an option isn't set
  * @expectedException \InvalidArgumentException
  */
 public function testRequirementsOnOptionsMissing()
 {
     $tokens = array('filename', '-a', 'v1');
     $cmd = new Command($tokens);
     $cmd->trapErrors(false)->beepOnError(false);
     $cmd->option('a')->needs('b');
 }