Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 099f8fe

Browse files
committed
Make Chain.capture() generic.
Closes #10 [email protected], [email protected] Review URL: https://codereview.chromium.org//1834283003 .
1 parent 2199ed3 commit 099f8fe

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.6.3
2+
3+
* Make `Chain.capture()` generic. Its signature is now `T Chain.capture<T>(T
4+
callback(), ...)`.
5+
16
## 1.6.2
27

38
* Fix all strong mode warnings.

lib/src/chain.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ class Chain implements StackTrace {
6868
/// considered unhandled.
6969
///
7070
/// If [callback] returns a value, it will be returned by [capture] as well.
71-
static capture(callback(), {void onError(error, Chain chain),
72-
bool when: true}) {
71+
static /*=T*? capture/*<T>*/(/*=T*/ callback(),
72+
{void onError(error, Chain chain), bool when: true}) {
7373
if (!when) {
7474
var newOnError;
7575
if (onError != null) {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: stack_trace
77
#
88
# When the major version is upgraded, you *must* update that version constraint
99
# in pub to stay in sync with this.
10-
version: 1.6.2
10+
version: 1.6.3
1111
author: "Dart Team <[email protected]>"
1212
homepage: http://github.com/dart-lang/stack_trace
1313
description: >

0 commit comments

Comments
 (0)