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

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

Issue 569743003: update error handling to send response with stack trace (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge 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
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 a92edc6c7aaab2dea433cb4c218ff2bae8074e83..c283fe40045d5b71e26a450c718a49a244b2127b 100644
--- a/pkg/analysis_server/lib/src/generated_protocol.dart
+++ b/pkg/analysis_server/lib/src/generated_protocol.dart
@@ -8082,7 +8082,7 @@ class RemoveContentOverlay implements HasToJson {
* {
* "code": RequestErrorCode
* "message": String
- * "data": optional object
+ * "stackTrace": optional String
* }
*/
class RequestError implements HasToJson {
@@ -8097,12 +8097,12 @@ class RequestError implements HasToJson {
String message;
/**
- * Additional data related to the error. This field is omitted if there is no
- * additional data available.
+ * The stack trace associated with processing the request, used for debugging
+ * the server.
*/
- Map data;
+ String stackTrace;
- RequestError(this.code, this.message, {this.data});
+ RequestError(this.code, this.message, {this.stackTrace});
factory RequestError.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
@@ -8121,11 +8121,11 @@ class RequestError implements HasToJson {
} else {
throw jsonDecoder.missingKey(jsonPath, "message");
}
- Map data;
- if (json.containsKey("data")) {
- data = json["data"];
+ String stackTrace;
+ if (json.containsKey("stackTrace")) {
+ stackTrace = jsonDecoder._decodeString(jsonPath + ".stackTrace", json["stackTrace"]);
}
- return new RequestError(code, message, data: data);
+ return new RequestError(code, message, stackTrace: stackTrace);
} else {
throw jsonDecoder.mismatch(jsonPath, "RequestError");
}
@@ -8135,8 +8135,8 @@ class RequestError implements HasToJson {
Map<String, dynamic> result = {};
result["code"] = code.toJson();
result["message"] = message;
- if (data != null) {
- result["data"] = data;
+ if (stackTrace != null) {
+ result["stackTrace"] = stackTrace;
}
return result;
}
@@ -8149,7 +8149,7 @@ class RequestError implements HasToJson {
if (other is RequestError) {
return code == other.code &&
message == other.message &&
- data == other.data;
+ stackTrace == other.stackTrace;
}
return false;
}
@@ -8159,7 +8159,7 @@ class RequestError implements HasToJson {
int hash = 0;
hash = _JenkinsSmiHash.combine(hash, code.hashCode);
hash = _JenkinsSmiHash.combine(hash, message.hashCode);
- hash = _JenkinsSmiHash.combine(hash, data.hashCode);
+ hash = _JenkinsSmiHash.combine(hash, stackTrace.hashCode);
return _JenkinsSmiHash.finish(hash);
}
}
« no previous file with comments | « pkg/analysis_server/lib/src/constants.dart ('k') | pkg/analysis_server/test/integration/protocol_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698