RakLibInterface: print packet exception info as a block using Utils::printableExceptionInfo()

This commit is contained in:
Dylan K. Taylor 2021-10-14 15:55:08 +01:00
parent 06e7338ff9
commit 8c07748100
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -192,10 +192,7 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
$logger->error("Bad packet (error ID $errorId): " . $e->getMessage());
//intentionally doesn't use logException, we don't want spammy packet error traces to appear in release mode
$logger->debug("Origin: " . Filesystem::cleanPath($e->getFile()) . "(" . $e->getLine() . ")");
foreach(Utils::printableTrace($e->getTrace()) as $frame){
$logger->debug($frame);
}
$logger->debug(implode("\n", Utils::printableExceptionInfo($e)));
$session->disconnect("Packet processing error (Error ID: $errorId)");
$this->interface->blockAddress($address, 5);
}