| OLD | NEW |
| 1 This library provides the ability to parse, inspect, and manipulate stack traces | 1 This library provides the ability to parse, inspect, and manipulate stack traces |
| 2 produced by the underlying Dart implementation. It also provides functions to | 2 produced by the underlying Dart implementation. It also provides functions to |
| 3 produce string representations of stack traces in a more readable format than | 3 produce string representations of stack traces in a more readable format than |
| 4 the native [StackTrace] implementation. | 4 the native [StackTrace] implementation. |
| 5 | 5 |
| 6 `Trace`s can be parsed from native [StackTrace]s using `Trace.from`, or captured | 6 `Trace`s can be parsed from native [StackTrace]s using `Trace.from`, or captured |
| 7 using `Trace.current`. Native [StackTrace]s can also be directly converted to | 7 using `Trace.current`. Native [StackTrace]s can also be directly converted to |
| 8 human-readable strings using `Trace.format`. | 8 human-readable strings using `Trace.format`. |
| 9 | 9 |
| 10 [StackTrace]: http://api.dartlang.org/docs/releases/latest/dart_core/StackTrace.
html | 10 [StackTrace]: http://api.dartlang.org/docs/releases/latest/dart_core/StackTrace.
html |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 ===== asynchronous gap =========================== | 198 ===== asynchronous gap =========================== |
| 199 dart:async _Future.then | 199 dart:async _Future.then |
| 200 test.dart 13:12 scheduleAsync | 200 test.dart 13:12 scheduleAsync |
| 201 test.dart 7:18 main.<fn> | 201 test.dart 7:18 main.<fn> |
| 202 package:stack_trace/src/chain.dart 93:20 Chain.capture | 202 package:stack_trace/src/chain.dart 93:20 Chain.capture |
| 203 test.dart 6:16 main | 203 test.dart 6:16 main |
| 204 dart:isolate _RawReceivePortImpl._handleMessage | 204 dart:isolate _RawReceivePortImpl._handleMessage |
| 205 | 205 |
| 206 That's a lot easier to understand! | 206 That's a lot easier to understand! |
| 207 | 207 |
| 208 ### `Chain.track` | |
| 209 | |
| 210 For the most part `Chain.capture` will notice when an error is thrown and | |
| 211 associate the correct stack chain with it. However, there are some cases where | |
| 212 exceptions won't be automatically detected: any `Future` constructor, | |
| 213 `Completer.completeError`, `Stream.addError`, and libraries that use these such | |
| 214 as `dart:io` and `dart:async`. For these, all you need to do is wrap the Future | |
| 215 or Stream in a call to `Chain.track` and the errors will be tracked correctly. | |
| 216 | |
| 217 [Zone]: https://api.dartlang.org/apidocs/channels/stable/#dart-async.Zone | 208 [Zone]: https://api.dartlang.org/apidocs/channels/stable/#dart-async.Zone |
| OLD | NEW |