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

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

Issue 180253005: Error handling and code cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge 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
« no previous file with comments | « pkg/analysis_server/lib/src/channel.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/lib/src/protocol.dart
diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
index 5827d47cd5b1c434e64a3e58ed9525046796b92e..123214f7214eaa648e42d342629559532ccd6640 100644
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ b/pkg/analysis_server/lib/src/protocol.dart
@@ -77,9 +77,11 @@ class Request {
String method = result[Request.METHOD];
Map<String, Object> params = result[Request.PARAMS];
Request request = new Request(id, method);
- params.forEach((String key, Object value) {
- request.setParameter(key, value);
- });
+ if (params != null) {
+ params.forEach((String key, Object value) {
+ request.setParameter(key, value);
+ });
+ }
return request;
} catch (exception) {
return null;
« no previous file with comments | « pkg/analysis_server/lib/src/channel.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698