Unverified Commit 246bf60f authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] allow default driver log to fail due to IO error (#69316)

parent 470346f7
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:io' show stderr;
import 'dart:io' show stderr, FileSystemException;
/// Standard error thrown by Flutter Driver API.
class DriverError extends Error {
......@@ -51,5 +51,9 @@ typedef DriverLogCallback = void Function(String source, String message);
///
/// The default implementation prints `"$source: $message"` to stderr.
DriverLogCallback driverLog = (String source, String message) {
stderr.writeln('$source: $message');
try {
stderr.writeln('$source: $message');
} on FileSystemException {
// May encounter IO error: https://github.com/flutter/flutter/issues/69314
}
};
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