Open cwbeck opened 8 years ago
You can use the parse method, or move your try block around the the code where commando is being used, rather than where the command is being defined.
PHP doc says: "Attempting to throw an exception from a destructor (called in the time of script termination) causes a fatal error." So you cannot throw exception here. Of course You can, but dontcatch.
Right. If you don't explicitly run your Command, you can't catch the errors since validation wont happen until script termination. That is exactly how it works.
But in your library...
Never gets to that statement
var_dump('caught');
Instead it just dumps out the error and dies...
Too add:
Created an identical function run(), when called (in sequence) the error is now caught properly. Is the a PHP issue whereby thrown \Exception after destruct? No idea...
Fixed in #69