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

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

Issue 530583004: Rename Error to RequestError in analysis server API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « pkg/analysis_server/lib/src/constants.dart ('k') | pkg/analysis_server/lib/src/protocol.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/generated_protocol.dart
diff --git a/pkg/analysis_server/lib/src/generated_protocol.dart b/pkg/analysis_server/lib/src/generated_protocol.dart
index a297c39a47497b1062f8cf1b8b7d7c6c092940f9..36e4b9bd8389a7490fdac062793fe8d1d2cd0881 100644
--- a/pkg/analysis_server/lib/src/generated_protocol.dart
+++ b/pkg/analysis_server/lib/src/generated_protocol.dart
@@ -5664,94 +5664,6 @@ class ElementKind {
}
/**
- * Error
- *
- * {
- * "code": RequestErrorCode
- * "message": String
- * "data": optional object
- * }
- */
-class Error implements HasToJson {
- /**
- * A code that uniquely identifies the error that occurred.
- */
- RequestErrorCode code;
-
- /**
- * A short description of the error.
- */
- String message;
-
- /**
- * Additional data related to the error. This field is omitted if there is no
- * additional data available.
- */
- Map data;
-
- Error(this.code, this.message, {this.data});
-
- factory Error.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
- if (json == null) {
- json = {};
- }
- if (json is Map) {
- RequestErrorCode code;
- if (json.containsKey("code")) {
- code = new RequestErrorCode.fromJson(jsonDecoder, jsonPath + ".code", json["code"]);
- } else {
- throw jsonDecoder.missingKey(jsonPath, "code");
- }
- String message;
- if (json.containsKey("message")) {
- message = jsonDecoder._decodeString(jsonPath + ".message", json["message"]);
- } else {
- throw jsonDecoder.missingKey(jsonPath, "message");
- }
- Map data;
- if (json.containsKey("data")) {
- data = json["data"];
- }
- return new Error(code, message, data: data);
- } else {
- throw jsonDecoder.mismatch(jsonPath, "Error");
- }
- }
-
- Map<String, dynamic> toJson() {
- Map<String, dynamic> result = {};
- result["code"] = code.toJson();
- result["message"] = message;
- if (data != null) {
- result["data"] = data;
- }
- return result;
- }
-
- @override
- String toString() => JSON.encode(toJson());
-
- @override
- bool operator==(other) {
- if (other is Error) {
- return code == other.code &&
- message == other.message &&
- data == other.data;
- }
- return false;
- }
-
- @override
- int get hashCode {
- int hash = 0;
- hash = _JenkinsSmiHash.combine(hash, code.hashCode);
- hash = _JenkinsSmiHash.combine(hash, message.hashCode);
- hash = _JenkinsSmiHash.combine(hash, data.hashCode);
- return _JenkinsSmiHash.finish(hash);
- }
-}
-
-/**
* ErrorFixes
*
* {
@@ -8082,6 +7994,94 @@ class RemoveContentOverlay implements HasToJson {
}
/**
+ * RequestError
+ *
+ * {
+ * "code": RequestErrorCode
+ * "message": String
+ * "data": optional object
+ * }
+ */
+class RequestError implements HasToJson {
+ /**
+ * A code that uniquely identifies the error that occurred.
+ */
+ RequestErrorCode code;
+
+ /**
+ * A short description of the error.
+ */
+ String message;
+
+ /**
+ * Additional data related to the error. This field is omitted if there is no
+ * additional data available.
+ */
+ Map data;
+
+ RequestError(this.code, this.message, {this.data});
+
+ factory RequestError.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
+ if (json == null) {
+ json = {};
+ }
+ if (json is Map) {
+ RequestErrorCode code;
+ if (json.containsKey("code")) {
+ code = new RequestErrorCode.fromJson(jsonDecoder, jsonPath + ".code", json["code"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "code");
+ }
+ String message;
+ if (json.containsKey("message")) {
+ message = jsonDecoder._decodeString(jsonPath + ".message", json["message"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "message");
+ }
+ Map data;
+ if (json.containsKey("data")) {
+ data = json["data"];
+ }
+ return new RequestError(code, message, data: data);
+ } else {
+ throw jsonDecoder.mismatch(jsonPath, "RequestError");
+ }
+ }
+
+ Map<String, dynamic> toJson() {
+ Map<String, dynamic> result = {};
+ result["code"] = code.toJson();
+ result["message"] = message;
+ if (data != null) {
+ result["data"] = data;
+ }
+ return result;
+ }
+
+ @override
+ String toString() => JSON.encode(toJson());
+
+ @override
+ bool operator==(other) {
+ if (other is RequestError) {
+ return code == other.code &&
+ message == other.message &&
+ data == other.data;
+ }
+ return false;
+ }
+
+ @override
+ int get hashCode {
+ int hash = 0;
+ hash = _JenkinsSmiHash.combine(hash, code.hashCode);
+ hash = _JenkinsSmiHash.combine(hash, message.hashCode);
+ hash = _JenkinsSmiHash.combine(hash, data.hashCode);
+ return _JenkinsSmiHash.finish(hash);
+ }
+}
+
+/**
* RequestErrorCode
*
* enum {
« no previous file with comments | « pkg/analysis_server/lib/src/constants.dart ('k') | pkg/analysis_server/lib/src/protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698