Unverified Commit 0dc80621 authored by Sam Rawlins's avatar Sam Rawlins Committed by GitHub

Return null instead of empty in Future.catchError callbacks (#72409)

parent a3971153
......@@ -618,7 +618,7 @@ class BrowserManager {
throwToolExit('${runtime.name} exited with code $browserExitCode before connecting.');
}).catchError((dynamic error, StackTrace stackTrace) {
if (completer.isCompleted) {
return;
return null;
}
completer.completeError(error, stackTrace);
}));
......@@ -630,7 +630,7 @@ class BrowserManager {
}).catchError((dynamic error, StackTrace stackTrace) {
chrome.close();
if (completer.isCompleted) {
return;
return null;
}
completer.completeError(error, stackTrace);
}));
......
......@@ -179,7 +179,10 @@ abstract class FlutterTestDriver {
// it forcefully and it won't terminate child processes, so we need to ensure
// it's running before terminating.
await resume().timeout(defaultTimeout)
.catchError((Object e) => _debugPrint('Ignoring failure to resume during shutdown'));
.catchError((Object e) {
_debugPrint('Ignoring failure to resume during shutdown');
return null;
});
_debugPrint('Sending SIGTERM to $_processPid..');
io.Process.killPid(_processPid, io.ProcessSignal.sigterm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment