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

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

Issue 225883004: Properly report errors with no stack traces when not using --trace. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/utils.dart
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index 2dec8034a8d580f9781d881d826303751189d21e..d9ab8a95294d54646db34daaf44d38ba1bcee9cc 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -117,9 +117,9 @@ Future captureErrors(Future callback(), {bool captureStackChains: false}) {
} else {
runZoned(wrappedCallback, onError: (e, stackTrace) {
if (stackTrace == null) {
- stackTrace = new Chain([new Trace.from(stackTrace)]);
+ stackTrace = new Chain.current();
} else {
- stackTrace = new Chain([]);
+ stackTrace = new Chain([new Trace.from(stackTrace)]);
}
completer.completeError(e, stackTrace);
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698