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

Unified Diff: pkg/http/lib/src/utils.dart

Issue 68493003: Ensure that errors have stack traces attached. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | « pkg/barback/lib/src/serialize.dart ('k') | pkg/http/test/safe_http_server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/lib/src/utils.dart
diff --git a/pkg/http/lib/src/utils.dart b/pkg/http/lib/src/utils.dart
index dd3547d54926e1c4ce7f09363084e58379405cd6..cc39d45a137489c5deac40640ae96ba1f86975ce 100644
--- a/pkg/http/lib/src/utils.dart
+++ b/pkg/http/lib/src/utils.dart
@@ -216,9 +216,7 @@ class Pair<E, F> {
/// Configures [future] so that its result (success or exception) is passed on
/// to [completer].
void chainToCompleter(Future future, Completer completer) {
- future.then((v) => completer.complete(v)).catchError((error) {
- completer.completeError(error);
- });
+ future.then(completer.complete, onError: completer.completeError);
}
// TOOD(nweiz): Get rid of this once https://codereview.chromium.org/11293132/
« no previous file with comments | « pkg/barback/lib/src/serialize.dart ('k') | pkg/http/test/safe_http_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698