mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user