mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 13:51:54 +01:00
log an error outside of requests
This commit is contained in:
parent
81418e2ce0
commit
2093a28182
@ -167,6 +167,9 @@ class LanguageServer extends Dispatcher
|
||||
$e
|
||||
);
|
||||
}
|
||||
if ($error !== null) {
|
||||
$this->logError($error->message);
|
||||
}
|
||||
// Only send a Response for a Request
|
||||
// Notifications do not send Responses
|
||||
/**
|
||||
@ -175,7 +178,6 @@ class LanguageServer extends Dispatcher
|
||||
*/
|
||||
if (Request::isRequest($msg->body)) {
|
||||
if ($error !== null) {
|
||||
$this->logError($error->message);
|
||||
$responseBody = new ErrorResponse($msg->body->id, $error);
|
||||
} else {
|
||||
$responseBody = new SuccessResponse($msg->body->id, $result);
|
||||
|
Loading…
x
Reference in New Issue
Block a user