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
1 changed files with 4 additions and 2 deletions

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) {}
}
}