mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Changed how exceptions work and are logged, throw proper exceptions on tasks
This commit is contained in:
@ -249,10 +249,7 @@ class ServerScheduler{
|
||||
$task->run($this->currentTick);
|
||||
}catch(\Throwable $e){
|
||||
Server::getInstance()->getLogger()->critical("Could not execute task " . $task->getTaskName() . ": " . $e->getMessage());
|
||||
$logger = Server::getInstance()->getLogger();
|
||||
if($logger instanceof MainLogger){
|
||||
$logger->logException($e);
|
||||
}
|
||||
Server::getInstance()->getLogger()->logException($e);
|
||||
}
|
||||
$task->timings->stopTiming();
|
||||
}
|
||||
|
Reference in New Issue
Block a user