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

Unified Diff: pkg/analysis_server/tool/spec/codegen_dart_protocol.dart

Issue 1246573002: Improve error messages for invalid requests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comments Created 5 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
« no previous file with comments | « pkg/analysis_server/lib/src/protocol.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
diff --git a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
index 88df36bd6cbdd5d0feb47504f75e2c4545486ab1..755ed526cebae56e4a06f71f0919b3b3423a23c1 100644
--- a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
+++ b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
@@ -349,7 +349,7 @@ class CodegenProtocolVisitor extends DartCodegenVisitor with CodeGenerator {
String humanReadableNameString =
literalString(impliedType.humanReadableName);
writeln(
- 'throw jsonDecoder.mismatch(jsonPath, $humanReadableNameString);');
+ 'throw jsonDecoder.mismatch(jsonPath, $humanReadableNameString, json);');
});
writeln('}');
}
@@ -590,7 +590,7 @@ class CodegenProtocolVisitor extends DartCodegenVisitor with CodeGenerator {
writeln('if ($fieldAccessor != $valueString) {');
indent(() {
writeln(
- 'throw jsonDecoder.mismatch(jsonPath, "equal " + $valueString);');
+ 'throw jsonDecoder.mismatch(jsonPath, "equal " + $valueString, json);');
});
writeln('}');
continue;
@@ -627,7 +627,7 @@ class CodegenProtocolVisitor extends DartCodegenVisitor with CodeGenerator {
writeln('} else {');
indent(() {
writeln(
- 'throw jsonDecoder.mismatch(jsonPath, $humanReadableNameString);');
+ 'throw jsonDecoder.mismatch(jsonPath, $humanReadableNameString, json);');
});
writeln('}');
});
« no previous file with comments | « pkg/analysis_server/lib/src/protocol.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698