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

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

Issue 185313002: restructure client api to use streams (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 0d39c312dbf0a6811b826d9d7ca1661bf18ae985..d2f926b8c3fdf6d1e1af1dbe2c2fbf882f025698 100644
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ b/pkg/analysis_server/lib/src/protocol.dart
@@ -265,8 +265,10 @@ class Response {
*/
factory Response.fromJson(Map<String, Object> json) {
try {
- // TODO process result
String id = json[Response.ID];
+ if (id == null) {
+ return null;
Brian Wilkerson 2014/03/01 17:16:37 Would it be better to throw an exception? (Not sur
danrubel 2014/03/03 16:52:20 I'm not sure either. Not in this CL, but this is s
+ }
var error = json[Response.ERROR];
var result = json[Response.RESULT];
Response response;

Powered by Google App Engine
This is Rietveld 408576698