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

Unified Diff: lib/src/runner/load_exception_suite.dart

Issue 1098963002: Preserve the stack traces for load errors in isolates and iframes. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 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 | « lib/src/executable.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/load_exception_suite.dart
diff --git a/lib/src/runner/load_exception_suite.dart b/lib/src/runner/load_exception_suite.dart
index 8aa7b29138dfcbc2856fe7c39e19c93db3c0173b..40589bbd99e555094ba36fe396f9ac2c62b7ba61 100644
--- a/lib/src/runner/load_exception_suite.dart
+++ b/lib/src/runner/load_exception_suite.dart
@@ -4,6 +4,8 @@
library test.runner.load_exception_suite;
+import 'dart:async';
+
import '../backend/invoker.dart';
import '../backend/metadata.dart';
import '../backend/suite.dart';
@@ -16,10 +18,13 @@ import 'load_exception.dart';
class LoadExceptionSuite extends Suite {
/// The exception that this suite exposes.
final LoadException exception;
+ final StackTrace stackTrace;
- LoadExceptionSuite(LoadException exception)
+ LoadExceptionSuite(LoadException exception, stackTrace)
: exception = exception,
+ stackTrace = stackTrace,
super([
- new LocalTest("load error", new Metadata(), () => throw exception)
+ new LocalTest("load error", new Metadata(),
+ () => new Future.error(exception, stackTrace))
], path: exception.path);
}
« no previous file with comments | « lib/src/executable.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698