Remove TaskHandler dependency on MainLogger

This instead allows the exception to be caught by the scheduler and reported using its logger.
This commit is contained in:
Dylan K. Taylor
2018-05-30 16:00:25 +01:00
parent e20be3eeba
commit a8c766be88
2 changed files with 8 additions and 6 deletions

View File

@@ -25,7 +25,6 @@ namespace pocketmine\scheduler;
use pocketmine\timings\Timings;
use pocketmine\timings\TimingsHandler;
use pocketmine\utils\MainLogger;
class TaskHandler{
@@ -145,8 +144,6 @@ class TaskHandler{
if(!$this->isCancelled()){
$this->task->onCancel();
}
}catch(\Throwable $e){
MainLogger::getLogger()->logException($e);
}finally{
$this->remove();
}