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

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

Issue 1099633004: Fix error handling for formatting and update the spec (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 bdc8608d20026257da80eee5e4b16e527e8df598..a0854aa871f19f723bc0e74fd904672cd03edf53 100644
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ b/pkg/analysis_server/lib/src/protocol.dart
@@ -690,14 +690,22 @@ class Response {
: _result = result;
/**
- * Initialize a newly created instance to represent the
- * FORMAT_INVALID_FILE error condition.
+ * Initialize a newly created instance to represent the FORMAT_INVALID_FILE
+ * error condition.
*/
Response.formatInvalidFile(Request request) : this(request.id,
error: new RequestError(RequestErrorCode.FORMAT_INVALID_FILE,
'Error during `edit.format`: invalid file.'));
/**
+ * Initialize a newly created instance to represent the FORMAT_WITH_ERROR
+ * error condition.
+ */
+ Response.formatWithErrors(Request request) : this(request.id,
+ error: new RequestError(RequestErrorCode.FORMAT_WITH_ERRORS,
+ 'Error during `edit.format`: source contains syntax errors.'));
+
+ /**
* Initialize a newly created instance based upon the given JSON data
*/
factory Response.fromJson(Map<String, Object> json) {

Powered by Google App Engine
This is Rietveld 408576698