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

Unified Diff: frog/leg/lib/js_helper.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
« no previous file with comments | « no previous file | frog/leg/ssa/builder.dart » ('j') | frog/leg/ssa/builder.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/lib/js_helper.dart
===================================================================
--- frog/leg/lib/js_helper.dart (revision 5017)
+++ frog/leg/lib/js_helper.dart (working copy)
@@ -1303,3 +1303,17 @@
}
return ex;
}
+
+class StackTrace {
+ var stack;
+ StackTrace(this.stack);
+ String toString() => stack != null ? stack : '';
+}
+
+/**
+ * Called by generated code to fetch the stack trace from an
+ * exception.
+ */
+StackTrace getTraceFromException(exception) {
+ return new StackTrace(JS("var", @"$0.stack", exception));
+}
« no previous file with comments | « no previous file | frog/leg/ssa/builder.dart » ('j') | frog/leg/ssa/builder.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698