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

Side by Side Diff: pkg/stack_trace/README.md

Issue 556363004: Add an error callback to StackZoneSpecification. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « pkg/stack_trace/CHANGELOG.md ('k') | pkg/stack_trace/lib/src/chain.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « pkg/stack_trace/CHANGELOG.md ('k') | pkg/stack_trace/lib/src/chain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698