Skip to content

Commit

Permalink
Make Chain.capture() generic.
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Mar 28, 2016
1 parent 2199ed3 commit 099f8fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.6.3

* Make `Chain.capture()` generic. Its signature is now `T Chain.capture<T>(T
callback(), ...)`.

## 1.6.2

* Fix all strong mode warnings.
Expand Down
4 changes: 2 additions & 2 deletions lib/src/chain.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ class Chain implements StackTrace {
/// considered unhandled.
///
/// If [callback] returns a value, it will be returned by [capture] as well.
static capture(callback(), {void onError(error, Chain chain),
bool when: true}) {
static /*=T*? capture/*<T>*/(/*=T*/ callback(),
{void onError(error, Chain chain), bool when: true}) {
if (!when) {
var newOnError;
if (onError != null) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: stack_trace
#
# When the major version is upgraded, you *must* update that version constraint
# in pub to stay in sync with this.
version: 1.6.2
version: 1.6.3
author: "Dart Team <[email protected]>"
homepage: http://github.com/dart-lang/stack_trace
description: >
Expand Down

0 comments on commit 099f8fe

Please sign in to comment.