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

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

Issue 809203002: Log more information to debug 'null' location for constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | « no previous file | pkg/analyzer/lib/src/generated/incremental_resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/protocol_server.dart
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
index c1ebd1b7eca3bbd0b29514e61a4f25a143f0b1c7..9f12f18a1ac72765b32351d9980f4499d306ab4f 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -230,6 +230,19 @@ NavigationTarget newNavigationTarget_fromElement(engine.Element element, int
fileToIndex(String file)) {
ElementKind kind = newElementKind_fromEngine(element.kind);
Location location = newLocation_fromElement(element);
+ // TODO(scheglov) debug null Location
+ if (location == null) {
+ String desc = 'location == null';
+ try {
+ desc += ' for: $element';
+ desc += ' of type: ${element.runtimeType}';
+ desc += ' element.location: ${element.location}';
+ desc += ' element.context: ${element.context}';
+ desc += ' element.source: ${element.source}';
+ } catch (e) {
+ }
+ throw new ArgumentError(desc);
+ }
String file = location.file;
int fileIndex = fileToIndex(file);
return new NavigationTarget(
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/incremental_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698