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

Unified Diff: lib/coreimpl/future_implementation.dart

Issue 11225017: Improvement on future: add stack trace to future failures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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: lib/coreimpl/future_implementation.dart
diff --git a/lib/coreimpl/future_implementation.dart b/lib/coreimpl/future_implementation.dart
index 9f0cafff9e17d2e7a21b9ba0f101f081de5a1223..8e1efd0ed858fa56007148cb01b4de488fb8553b 100644
--- a/lib/coreimpl/future_implementation.dart
+++ b/lib/coreimpl/future_implementation.dart
@@ -57,7 +57,7 @@ class FutureImpl<T> implements Future<T> {
throw new FutureNotCompleteException();
}
if (_exception !== null) {
- throw _exception;
+ throw new FutureUnhandledException(_exception, stackTrace);
}
return _value;
}
@@ -90,7 +90,7 @@ class FutureImpl<T> implements Future<T> {
} else if (!isComplete) {
_successListeners.add(onSuccess);
} else if (!_exceptionHandled) {
- throw _exception;
+ throw new FutureUnhandledException(_exception, stackTrace);
}
}
@@ -136,7 +136,7 @@ class FutureImpl<T> implements Future<T> {
}
} else {
if (!_exceptionHandled && _successListeners.length > 0) {
- throw _exception;
+ throw new FutureUnhandledException(_exception, stackTrace);
}
}
} finally {
« lib/core/future.dart ('K') | « lib/core/future.dart ('k') | tests/corelib/future_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698