Log multireason exceptions
This commit is contained in:
parent
28e236e880
commit
4c8c6043c6
@ -33,6 +33,7 @@ use Amp\DoH\DoHConfig;
|
|||||||
use Amp\DoH\Nameserver;
|
use Amp\DoH\Nameserver;
|
||||||
use Amp\DoH\Rfc8484StubResolver;
|
use Amp\DoH\Rfc8484StubResolver;
|
||||||
use Amp\Loop;
|
use Amp\Loop;
|
||||||
|
use Amp\MultiReasonException;
|
||||||
use Amp\NullCancellationToken;
|
use Amp\NullCancellationToken;
|
||||||
use Amp\Promise;
|
use Amp\Promise;
|
||||||
use Amp\Socket\ClientConnectContext;
|
use Amp\Socket\ClientConnectContext;
|
||||||
@ -481,8 +482,11 @@ class DataCenter
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
$this->API->logger->logger('Connection failed: '.$e, \danog\MadelineProto\Logger::ERROR);
|
$this->API->logger->logger('Connection failed: '.$e, \danog\MadelineProto\Logger::ERROR);
|
||||||
} catch (\Exception $e) {
|
if ($e instanceof MultiReasonException) {
|
||||||
$this->API->logger->logger('Connection failed: '.$e, \danog\MadelineProto\Logger::ERROR);
|
foreach ($e->getReasons() as $reason) {
|
||||||
|
$this->API->logger->logger('Multireason: '.$reason, \danog\MadelineProto\Logger::ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user