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

Unified Diff: sdk/lib/core/future_impl.dart

Issue 11308281: Preserve the stack trace for rethrown exceptions in Future.transformException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « no previous file | tests/corelib/future_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/future_impl.dart
diff --git a/sdk/lib/core/future_impl.dart b/sdk/lib/core/future_impl.dart
index 2c22e46123115e6b3dd852f5ed4fc5333f1975c7..95ee9831f9e6119f10c2090feb9a77d0c45d58e0 100644
--- a/sdk/lib/core/future_impl.dart
+++ b/sdk/lib/core/future_impl.dart
@@ -235,7 +235,11 @@ class _FutureImpl<T> implements Future<T> {
completer.complete(result);
}
} catch (innerException, stackTrace) {
- completer.completeException(innerException, stackTrace);
+ if (identical(ex, innerException)) {
+ completer.completeException(innerException, this.stackTrace);
+ } else {
+ completer.completeException(innerException, stackTrace);
+ }
}
return false;
});
« no previous file with comments | « no previous file | tests/corelib/future_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698