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

Unified Diff: lib/src/chain.dart

Issue 1576853003: Deprecate the ChainHandler typedef. (Closed) Base URL: git@github.com:dart-lang/stack_trace@master
Patch Set: . Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/stack_zone_specification.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/chain.dart
diff --git a/lib/src/chain.dart b/lib/src/chain.dart
index 2e63ef02c6ffb3652a27d8bacb029f3cf2598755..4baec216c8757a5de7f74c4ec3be105636aad78d 100644
--- a/lib/src/chain.dart
+++ b/lib/src/chain.dart
@@ -14,6 +14,7 @@ import 'trace.dart';
import 'utils.dart';
/// A function that handles errors in the zone wrapped by [Chain.capture].
+@Deprecated("Will be removed in stack_trace 2.0.0.")
typedef void ChainHandler(error, Chain chain);
/// A chain of stack traces.
@@ -63,7 +64,7 @@ class Chain implements StackTrace {
/// considered unhandled.
///
/// If [callback] returns a value, it will be returned by [capture] as well.
- static capture(callback(), {ChainHandler onError}) {
+ static capture(callback(), {void onError(error, Chain chain)}) {
var spec = new StackZoneSpecification(onError);
return runZoned(() {
try {
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/stack_zone_specification.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698