mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-22 14:51:17 +01:00
Fix: log deserialization errors
This commit is contained in:
parent
7d4cc59221
commit
dec5bff3c9
@ -198,7 +198,13 @@ final class ReadLoop extends Loop
|
||||
}
|
||||
$this->logger->logger('Received payload from DC '.$this->datacenter, Logger::ULTRA_VERBOSE);
|
||||
|
||||
$deserialized = $this->API->getTL()->deserialize($message_data, ['type' => '', 'connection' => $this->connection]);
|
||||
try {
|
||||
$deserialized = $this->API->getTL()->deserialize($message_data, ['type' => '', 'connection' => $this->connection]);
|
||||
} catch (\Throwable $e) {
|
||||
Logger::log('Error during deserializing message (base64): ' . base64_encode($message_data), Logger::ERROR);
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$sideEffects = $this->API->getTL()->getSideEffects();
|
||||
$message = new MTProtoIncomingMessage($deserialized, $message_id);
|
||||
$message->setSideEffects($sideEffects);
|
||||
|
Loading…
x
Reference in New Issue
Block a user