Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/DartElementLocator.java |
=================================================================== |
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/DartElementLocator.java (revision 1198) |
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/DartElementLocator.java (working copy) |
@@ -304,7 +304,16 @@ |
@Override |
public Void visitNode(DartNode node) { |
- node.accept(childVisitor); |
+ try { |
+ node.accept(childVisitor); |
+ } catch (DartElementFoundException exception) { |
+ throw exception; |
+ } catch (Exception exception) { |
+ // Ignore the exception and proceed in order to visit the rest of the structure. |
+ DartCore.logInformation( |
+ "Exception caught while traversing an AST structure. Please report to the dartc team.", |
+ exception); |
+ } |
return null; |
} |