commit | 947274544649ea9911b1e8b0bc4e811eaf2abfff | [log] [tgz] |
---|---|---|
author | Danny Tuppeny <dantup@google.com> | Mon May 13 15:03:11 2019 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Mon May 13 15:03:11 2019 +0000 |
tree | 05c9f1ed489e3cce17f004321098a81b92f9eb71 | |
parent | ef971f37877a5b520c1f4e814024d88e491dabf9 [diff] |
Change error code for server shutting down See https://github.com/Microsoft/language-server-protocol/issues/684#issuecomment-477215334. Change-Id: I9e45dd27ea914af8bc3b936e9885c113211c50ce Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102361 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Danny Tuppeny <dantup@google.com>
diff --git a/pkg/analysis_server/lib/src/lsp/constants.dart b/pkg/analysis_server/lib/src/lsp/constants.dart index 2c4999c..aaf762f 100644 --- a/pkg/analysis_server/lib/src/lsp/constants.dart +++ b/pkg/analysis_server/lib/src/lsp/constants.dart
@@ -41,7 +41,6 @@ static const FileHasErrors = const ErrorCodes(-32008); static const ClientFailedToApplyEdit = const ErrorCodes(-32009); static const RenameNotValid = const ErrorCodes(-32010); - static const ServerShuttingDown = const ErrorCodes(-32011); /// An error raised when the server detects that the server and client are out /// of sync and cannot recover. For example if a textDocument/didChange notification
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart index cd79433..bf4600e 100644 --- a/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart +++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
@@ -141,7 +141,7 @@ if (message is! RequestMessage) { return success(); } - return failure(ServerErrorCodes.ServerShuttingDown, + return failure(ErrorCodes.InvalidRequest, 'Unable to handle ${message.method} after shutdown request'); } }