Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1651)

Unified Diff: pkg/analysis_server/lib/src/protocol.dart

Issue 417433003: Send responses for any pending 'analysis.getErrors' requests during context removal. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/protocol.dart
diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
index fdfdba90d8afed5c28aa18ee9d132b01955fda2a..f2750014fe99b3fe32119452cc59470f2f5bce74 100644
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ b/pkg/analysis_server/lib/src/protocol.dart
@@ -586,6 +586,15 @@ class Response {
: this(request.id, new RequestError(-12, 'Unknown analysis option: "$optionName"'));
/**
+ * Initialize a newly created instance to represent an error condition caused
+ * by an error during `analysis.getErrors`.
+ */
+ Response.getErrorsError(Request request, String message)
+ : this(
+ request.id,
+ new RequestError(-13, 'Error during `analysis.getErrors`: $message.'));
+
+ /**
* Initialize a newly created instance based upon the given JSON data
*/
factory Response.fromJson(Map<String, Object> json) {
@@ -705,6 +714,11 @@ class RequestError {
*/
static const int CODE_SDK_ERROR = -32603;
+ /**
+ * An error code indicating a problem during 'analysis.getErrors'.
+ */
+ static const int CODE_ANALISYS_GET_ERRORS_ERROR = -32500;
+
/*
* In addition, codes -32000 to -32099 indicate a server error. They are
* reserved for implementation-defined server-errors.
« no previous file with comments | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | pkg/analysis_server/test/analysis/get_errors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698