mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Throw CRITICAL error message on unhandled Exception on commands instead of crashing
This commit is contained in:
parent
d473ce13ee
commit
500a690cd0
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user