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

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, 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 | « 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 4945)
+++ frog/leg/lib/js_helper.dart (working copy)
@@ -1303,3 +1303,13 @@
}
return ex;
}
+
+class StackTrace {
ahe 2012/03/06 08:44:22 This class is hidden from users (because it is def
ngeoffray 2012/03/06 12:12:50 The StackTrace class/interface is not in core, nor
+ var stack;
+ StackTrace(this.stack);
+ toString() => stack != null ? stack : '';
floitsch 2012/03/06 10:22:32 Please type toString as returning a String.
ngeoffray 2012/03/06 12:12:50 Done.
+}
+
+getTraceFromException(exception) {
ahe 2012/03/06 08:44:22 Please add a documentation comment that explains w
ngeoffray 2012/03/06 12:12:50 Done.
+ return new StackTrace(JS("var", @"$0.stack", exception));
ahe 2012/03/06 08:44:22 Nice. I didn't realize you could use "var" here. B
+}
« 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