Improved logs
This commit is contained in:
parent
a1daca04da
commit
5b51d71257
@ -166,6 +166,7 @@ class API extends APIFactory
|
|||||||
if ($this->asyncInitPromise) {
|
if ($this->asyncInitPromise) {
|
||||||
$this->init();
|
$this->init();
|
||||||
}
|
}
|
||||||
|
$this->API->logger('Shutting down MadelineProto (normally or due to an exception, idk)');
|
||||||
$this->wait($this->serialize());
|
$this->wait($this->serialize());
|
||||||
//restore_error_handler();
|
//restore_error_handler();
|
||||||
}
|
}
|
||||||
|
@ -298,7 +298,11 @@ trait Tools
|
|||||||
$file = " started @ $file";
|
$file = " started @ $file";
|
||||||
}
|
}
|
||||||
$logger->logger("Got the following exception within a forked strand$file, trying to rethrow");
|
$logger->logger("Got the following exception within a forked strand$file, trying to rethrow");
|
||||||
$logger->logger((string) $e);
|
if ($e->getMessage() === "Cannot get return value of a generator that hasn't returned") {
|
||||||
|
$logger->logger("Well you know, this might actually not be the actual exception, scroll up in the logs to see the actual exception");
|
||||||
|
} else {
|
||||||
|
$logger->logger($e);
|
||||||
|
}
|
||||||
Promise\rethrow(new Failure($e));
|
Promise\rethrow(new Failure($e));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user