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

Unified Diff: sdk/lib/_internal/pub/lib/src/error_group.dart

Issue 25027004: Add second argument to Future error handlers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 years, 2 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
Index: sdk/lib/_internal/pub/lib/src/error_group.dart
diff --git a/sdk/lib/_internal/pub/lib/src/error_group.dart b/sdk/lib/_internal/pub/lib/src/error_group.dart
index 1130ef97e941a69fd3ab6056668a61b0129cc82e..8d73f84f00b28a69a314b9033af29ac29230b678 100644
--- a/sdk/lib/_internal/pub/lib/src/error_group.dart
+++ b/sdk/lib/_internal/pub/lib/src/error_group.dart
@@ -179,12 +179,12 @@ class _ErrorGroupFuture implements Future {
_completer.future.catchError((_) {});
}
- Future then(onValue(value), {onError(error)}) {
+ Future then(onValue(value), { Function onError }) {
nweiz 2013/10/07 20:30:39 No spaces before "Function" or after "onError".
floitsch 2013/10/10 13:47:33 Done.
Lasse Reichstein Nielsen 2013/10/10 13:49:14 I actually prefer the spaces.
nweiz 2013/10/10 15:09:20 It's contrary to the style guide: "DON’T use a spa
_hasListeners = true;
return _completer.future.then(onValue, onError: onError);
}
- Future catchError(onError(error), {bool test(Object error)}) {
+ Future catchError(Function onError, {bool test(Object error)}) {
_hasListeners = true;
return _completer.future.catchError(onError, test: test);
}

Powered by Google App Engine
This is Rietveld 408576698