1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 01:14:39 +01:00

Prevent errors from surfacing

This commit is contained in:
Daniil Gentili 2019-12-28 23:57:41 +01:00
parent e5e82f0b58
commit a3bfde1dea
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -178,7 +178,9 @@ while (true) {
try {
$MadelineProto->loop();
} catch (\Throwable $e) {
$MadelineProto->logger("Surfaced: $e");
$MadelineProto->getEventHandler(['async' => false])->report("Surfaced: $e");
try {
$MadelineProto->logger("Surfaced: $e");
$MadelineProto->getEventHandler(['async' => false])->report("Surfaced: $e");
} catch (\Throwable $e) {}
}
}