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

Unified Diff: frog/leg/tree/nodes.dart

Issue 9601014: Support for stack traces in catch blocks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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: frog/leg/tree/nodes.dart
===================================================================
--- frog/leg/tree/nodes.dart (revision 5017)
+++ frog/leg/tree/nodes.dart (working copy)
@@ -1660,6 +1660,20 @@
accept(Visitor visitor) => visitor.visitCatchBlock(this);
+ Node get exception() {
+ if (formals.nodes.isEmpty()) return null;
ahe 2012/03/06 12:24:07 Perhaps you should check if this returns null in t
ngeoffray 2012/03/06 12:29:40 It's already doing it.
+ VariableDefinitions declarations = formals.nodes.head;
+ return declarations.definitions.nodes.head;
+ }
+
+ Node get trace() {
+ if (formals.nodes.isEmpty()) return null;
+ Link<VariableDefinitions> declarations = formals.nodes.tail;
+ return declarations.isEmpty()
+ ? null
+ : declarations.head.definitions.nodes.head;
+ }
+
visitChildren(Visitor visitor) {
formals.accept(visitor);
block.accept(visitor);

Powered by Google App Engine
This is Rietveld 408576698