| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 stack_trace.stack_zone_specification; | |
| 6 | |
| 7 import 'dart:async'; | 5 import 'dart:async'; |
| 8 | 6 |
| 9 import 'trace.dart'; | 7 import 'trace.dart'; |
| 10 import 'chain.dart'; | 8 import 'chain.dart'; |
| 11 | 9 |
| 12 /// A function that handles errors in the zone wrapped by [Chain.capture]. | 10 /// A function that handles errors in the zone wrapped by [Chain.capture]. |
| 13 typedef void _ChainHandler(error, Chain chain); | 11 typedef void _ChainHandler(error, Chain chain); |
| 14 | 12 |
| 15 /// A class encapsulating the zone specification for a [Chain.capture] zone. | 13 /// A class encapsulating the zone specification for a [Chain.capture] zone. |
| 16 /// | 14 /// |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 Chain toChain() { | 228 Chain toChain() { |
| 231 var nodes = <Trace>[]; | 229 var nodes = <Trace>[]; |
| 232 var node = this; | 230 var node = this; |
| 233 while (node != null) { | 231 while (node != null) { |
| 234 nodes.add(node.trace); | 232 nodes.add(node.trace); |
| 235 node = node.previous; | 233 node = node.previous; |
| 236 } | 234 } |
| 237 return new Chain(nodes); | 235 return new Chain(nodes); |
| 238 } | 236 } |
| 239 } | 237 } |
| OLD | NEW |