All pocketmine\thread\Thread now log uncaught exceptions and fatal errors by default

This commit is contained in:
Dylan K. Taylor
2023-08-08 14:56:54 +01:00
parent 2e58387a43
commit 2559d1719f
3 changed files with 15 additions and 12 deletions

View File

@ -85,6 +85,7 @@ class RakLibServer extends Thread{
gc_enable();
ini_set("display_errors", '1');
ini_set("display_startup_errors", '1');
\GlobalLogger::set($this->logger);
$socket = new ServerSocket($this->address->deserialize());
$manager = new Server(
@ -107,11 +108,6 @@ class RakLibServer extends Thread{
$manager->waitShutdown();
}
protected function onUncaughtException(\Throwable $e) : void{
parent::onUncaughtException($e);
$this->logger->logException($e);
}
public function getThreadName() : string{
return "RakLib";
}