You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would love to see a way to handle exceptions in a better way. I tried to implement it myself utilizing my own loop like this:
public function loop(){
while(true) {
try {
$this->server->run();
} catch (\Zend\Mail\Header\Exception\InvalidArgumentException $e){
$this->log($e->getMessage());
$this->log($e->getCode());
$this->log($e->getFile().' line '.$e->getLine());
}
}
}
But problem is that there is for now NO way to tell the client connecting that something went wrong.
It would be totally awesome if we could register an method to handle all exceptions from the server, which also would send the client for which the exception occurred. It could look something like this.
$server->addExceptionHandler(function ($exception, $client){
$server->logger('something went wrong')
$client->sendSyntaxErrorInParameters();
});
All in all - awesome package. :) 👍
The text was updated successfully, but these errors were encountered:
I would love to see a way to handle exceptions in a better way. I tried to implement it myself utilizing my own loop like this:
But problem is that there is for now NO way to tell the client connecting that something went wrong.
It would be totally awesome if we could register an method to handle all exceptions from the server, which also would send the client for which the exception occurred. It could look something like this.
All in all - awesome package. :) 👍
The text was updated successfully, but these errors were encountered: