Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 } | |
| OLD | NEW |