blob: b0f2bac4dce81c523d383cfee53c70737d4a8ff7 [file] [log] [blame]
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the file.
library testing.error_handling;
import 'dart:async' show Future;
import 'dart:io' show exitCode, stderr;
import 'dart:isolate' show ReceivePort;
Future withErrorHandling(Future f()) async {
final ReceivePort port = new ReceivePort();
try {
return await f();
} catch (e, trace) {
exitCode = 1;
if (trace != null) {
} finally {