start using pocketmine/errorhandler

This commit is contained in:
Dylan K. Taylor
2020-05-10 13:04:40 +01:00
parent 65e359584e
commit 3299bc4023
6 changed files with 44 additions and 5 deletions

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\utils;
use LogLevel;
use pocketmine\errorhandler\ErrorTypeToStringMap;
use pocketmine\thread\Thread;
use pocketmine\thread\Worker;
use function fclose;
@@ -170,7 +171,7 @@ class MainLogger extends \AttachableThreadedLogger implements \BufferedLogger{
$errno = $e->getCode();
try{
$errno = \ErrorUtils::errorTypeToString($errno);
$errno = ErrorTypeToStringMap::get($errno);
}catch(\InvalidArgumentException $e){
//pass
}