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

Unified Diff: pkg/testing/lib/src/zone_helper.dart

Issue 2675593003: Enable running of fasta tests on build bot. (Closed)
Patch Set: Rebased on 17d8de6063e78eb14b7c1814626743164a4473d9. Created 3 years, 11 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 | « pkg/testing/lib/src/chain.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/testing/lib/src/zone_helper.dart
diff --git a/pkg/testing/lib/src/zone_helper.dart b/pkg/testing/lib/src/zone_helper.dart
index 6f8364a5aef7e6c7ba4b517752f63ba79c70f7f5..0429260ed66549ac4a3afcdb1e2e2a6a6b120025 100644
--- a/pkg/testing/lib/src/zone_helper.dart
+++ b/pkg/testing/lib/src/zone_helper.dart
@@ -11,6 +11,10 @@ import 'dart:async' show
ZoneSpecification,
runZoned;
+import 'dart:io' show
+ exit,
+ stderr;
+
import 'dart:isolate' show
Capability,
Isolate,
@@ -40,8 +44,16 @@ Future runGuarded(
} else if (handleLateError != null) {
handleLateError(error, stackTrace);
} else {
- // Delegate to parent.
- throw error;
+ String errorString = "error.toString() failed.";
+ try {
+ errorString = "$error";
+ } catch (_) {
+ // Ignored.
+ }
+ stderr.write("$errorString\n" +
+ (stackTrace == null ? "" : "$stackTrace"));
+ stderr.flush();
+ exit(255);
}
}
@@ -59,6 +71,7 @@ Future runGuarded(
handleUncaughtError(error, stackTrace);
}).asFuture();
+ Isolate.current.setErrorsFatal(false);
Isolate.current.addErrorListener(errorPort.sendPort);
return acknowledgeControlMessages(Isolate.current).then((_) {
runZoned(
« no previous file with comments | « pkg/testing/lib/src/chain.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698