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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | frog/leg/ssa/builder.dart » ('j') | frog/leg/ssa/builder.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('js_helper'); 5 #library('js_helper');
6 6
7 #import('coreimpl.dart'); 7 #import('coreimpl.dart');
8 8
9 #source('date_helper.dart'); 9 #source('date_helper.dart');
10 #source('regexp_helper.dart'); 10 #source('regexp_helper.dart');
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 } 1296 }
1297 } 1297 }
1298 } else if (JS('bool', @'$0 instanceof RangeError', ex)) { 1298 } else if (JS('bool', @'$0 instanceof RangeError', ex)) {
1299 var message = JS('String', @'$0.message', ex); 1299 var message = JS('String', @'$0.message', ex);
1300 if (message.contains('call stack')) { 1300 if (message.contains('call stack')) {
1301 return new StackOverflowException(); 1301 return new StackOverflowException();
1302 } 1302 }
1303 } 1303 }
1304 return ex; 1304 return ex;
1305 } 1305 }
1306
1307 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
1308 var stack;
1309 StackTrace(this.stack);
1310 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.
1311 }
1312
1313 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.
1314 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
1315 }
OLDNEW
« 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