mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Ignore non-fatal error types in crash handlers
ErrorToExceptionHandler currently prevents these from appearing by turning them into exceptions, but this won't always be the case. For example, in the future we may not want to turn ALL types of E_* errors into exceptions (e.g. E_DEPRECATED).
This commit is contained in:
@ -25,6 +25,7 @@ namespace pocketmine\thread;
|
||||
|
||||
use pmmp\thread\Thread as NativeThread;
|
||||
use pmmp\thread\ThreadSafeArray;
|
||||
use pocketmine\crash\CrashDump;
|
||||
use pocketmine\errorhandler\ErrorToExceptionHandler;
|
||||
use pocketmine\Server;
|
||||
use function error_get_last;
|
||||
@ -150,7 +151,7 @@ trait CommonThreadPartsTrait{
|
||||
$this->synchronized(function() : void{
|
||||
if($this->isTerminated() && $this->crashInfo === null){
|
||||
$last = error_get_last();
|
||||
if($last !== null){
|
||||
if($last !== null && ($last["type"] & CrashDump::FATAL_ERROR_MASK) !== 0){
|
||||
//fatal error
|
||||
$crashInfo = ThreadCrashInfo::fromLastErrorInfo($last, $this->getThreadName());
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user