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

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

Issue 904733003: Rework requests in execution domain (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean-up Created 5 years, 10 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 dfa810cdb1deb06f8617cc37ca9097667b1bb150..10aea74de164a84d68c06ce7869d33014ab7ae57 100644
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ b/pkg/analysis_server/lib/src/protocol.dart
@@ -763,6 +763,18 @@ class Response {
/**
* Initialize a newly created instance to represent an error condition caused
+ * by a [request] that specifies an execution context whose context root does
+ * not exist.
+ */
+ Response.invalidExecutionContext(Request request, String contextId)
+ : this(
+ request.id,
+ error: new RequestError(
+ RequestErrorCode.INVALID_EXECUTION_CONTEXT,
+ "Invalid execution context: $contextId"));
+
+ /**
+ * Initialize a newly created instance to represent an error condition caused
* by a [request] that had invalid parameter. [path] is the path to the
* invalid parameter, in Javascript notation (e.g. "foo.bar" means that the
* parameter "foo" contained a key "bar" whose value was the wrong type).
@@ -773,7 +785,7 @@ class Response {
request.id,
error: new RequestError(
RequestErrorCode.INVALID_PARAMETER,
- "Expected parameter $path to $expectation"));
+ "Invalid parameter '$path'. $expectation."));
/**
* Initialize a newly created instance to represent an error condition caused
@@ -785,6 +797,17 @@ class Response {
error: new RequestError(RequestErrorCode.INVALID_REQUEST, 'Invalid request'));
/**
+ * Initialize a newly created instance to represent the
+ * REFACTORING_REQUEST_CANCELLED error condition.
+ */
+ Response.refactoringRequestCancelled(Request request)
+ : this(
+ request.id,
+ error: new RequestError(
+ RequestErrorCode.REFACTORING_REQUEST_CANCELLED,
+ 'The `edit.getRefactoring` request was cancelled.'));
+
+ /**
* Initialize a newly created instance to represent the SERVER_ERROR error
* condition.
*/
@@ -810,17 +833,6 @@ class Response {
/**
* Initialize a newly created instance to represent the
- * REFACTORING_REQUEST_CANCELLED error condition.
- */
- Response.refactoringRequestCancelled(Request request)
- : this(
- request.id,
- error: new RequestError(
- RequestErrorCode.REFACTORING_REQUEST_CANCELLED,
- 'The `edit.getRefactoring` request was cancelled.'));
-
- /**
- * Initialize a newly created instance to represent the
* SORT_MEMBERS_PARSE_ERRORS error condition.
*/
Response.sortMembersParseErrors(Request request, int numErrors)

Powered by Google App Engine
This is Rietveld 408576698