Throw CRITICAL error message on unhandled Exception on commands instead of crashing

This commit is contained in:
Shoghi Cervantes 2014-10-15 18:35:42 +02:00
parent d473ce13ee
commit 500a690cd0

View File

@ -178,7 +178,11 @@ class SimpleCommandMap implements CommandMap{
}
$target->timings->startTiming();
$target->execute($sender, $sentCommandLabel, $args);
try{
$target->execute($sender, $sentCommandLabel, $args);
}catch(\Exception $e){
$this->server->getLogger()->critical("Unhandled exception executing command '". $commandLine ,"' in ". $target);
}
$target->timings->stopTiming();
return true;