Ignore body_might_complete_normally_catch_error violations (#105795)
This commit is contained in:
parent
32b22b85de
commit
f104be7ae9
@ -141,6 +141,9 @@ class TestDefaultBinaryMessenger extends BinaryMessenger {
|
|||||||
if (resultFuture != null) {
|
if (resultFuture != null) {
|
||||||
_pendingMessages.add(resultFuture);
|
_pendingMessages.add(resultFuture);
|
||||||
resultFuture
|
resultFuture
|
||||||
|
// TODO(srawlins): Fix this static issue,
|
||||||
|
// https://github.com/flutter/flutter/issues/105750.
|
||||||
|
// ignore: body_might_complete_normally_catch_error
|
||||||
.catchError((Object error) { /* errors are the responsibility of the caller */ })
|
.catchError((Object error) { /* errors are the responsibility of the caller */ })
|
||||||
.whenComplete(() => _pendingMessages.remove(resultFuture));
|
.whenComplete(() => _pendingMessages.remove(resultFuture));
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,9 @@ void main() {
|
|||||||
final BinaryMessenger delegate = TestDelegate();
|
final BinaryMessenger delegate = TestDelegate();
|
||||||
final Future<ByteData?>? future = delegate.send('', null);
|
final Future<ByteData?>? future = delegate.send('', null);
|
||||||
expect(future, isNotNull);
|
expect(future, isNotNull);
|
||||||
|
// TODO(srawlins): Fix this static issue,
|
||||||
|
// https://github.com/flutter/flutter/issues/105750.
|
||||||
|
// ignore: body_might_complete_normally_catch_error
|
||||||
await future!.catchError((Object error) { });
|
await future!.catchError((Object error) { });
|
||||||
try {
|
try {
|
||||||
await TestDefaultBinaryMessenger(delegate).send('', null);
|
await TestDefaultBinaryMessenger(delegate).send('', null);
|
||||||
|
@ -520,7 +520,11 @@ class ProxiedPortForwarder extends DevicePortForwarder {
|
|||||||
socket.listen((Uint8List data) {
|
socket.listen((Uint8List data) {
|
||||||
unawaited(connection.sendRequest('proxy.write', <String, Object>{
|
unawaited(connection.sendRequest('proxy.write', <String, Object>{
|
||||||
'id': id,
|
'id': id,
|
||||||
}, data).catchError((Object error, StackTrace stackTrace) {
|
}, data)
|
||||||
|
// TODO(srawlins): Fix this static issue,
|
||||||
|
// https://github.com/flutter/flutter/issues/105750.
|
||||||
|
// ignore: body_might_complete_normally_catch_error
|
||||||
|
.catchError((Object error, StackTrace stackTrace) {
|
||||||
// Log the error, but proceed normally. Network failure should not
|
// Log the error, but proceed normally. Network failure should not
|
||||||
// crash the tool. If this is critical, the place where the connection
|
// crash the tool. If this is critical, the place where the connection
|
||||||
// is being used would crash.
|
// is being used would crash.
|
||||||
@ -537,7 +541,11 @@ class ProxiedPortForwarder extends DevicePortForwarder {
|
|||||||
// Send a proxy disconnect event just in case.
|
// Send a proxy disconnect event just in case.
|
||||||
unawaited(connection.sendRequest('proxy.disconnect', <String, Object>{
|
unawaited(connection.sendRequest('proxy.disconnect', <String, Object>{
|
||||||
'id': id,
|
'id': id,
|
||||||
}).catchError((Object error, StackTrace stackTrace) {
|
})
|
||||||
|
// TODO(srawlins): Fix this static issue,
|
||||||
|
// https://github.com/flutter/flutter/issues/105750.
|
||||||
|
// ignore: body_might_complete_normally_catch_error
|
||||||
|
.catchError((Object error, StackTrace stackTrace) {
|
||||||
// Ignore the error here. There might be a race condition when the
|
// Ignore the error here. There might be a race condition when the
|
||||||
// remote end also disconnects. In any case, this request is just to
|
// remote end also disconnects. In any case, this request is just to
|
||||||
// notify the remote end to disconnect and we should not crash when
|
// notify the remote end to disconnect and we should not crash when
|
||||||
|
@ -288,6 +288,9 @@ Future<vm_service.VmService> setUpVmService(
|
|||||||
// thrown if we're already subscribed.
|
// thrown if we're already subscribed.
|
||||||
registrationRequests.add(vmService
|
registrationRequests.add(vmService
|
||||||
.streamListen(vm_service.EventStreams.kExtension)
|
.streamListen(vm_service.EventStreams.kExtension)
|
||||||
|
// TODO(srawlins): Fix this static issue,
|
||||||
|
// https://github.com/flutter/flutter/issues/105750.
|
||||||
|
// ignore: body_might_complete_normally_catch_error
|
||||||
.catchError((Object? error) {}, test: (Object? error) => error is vm_service.RPCError)
|
.catchError((Object? error) {}, test: (Object? error) => error is vm_service.RPCError)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -297,7 +297,11 @@ Future<ProcessTestResult> runFlutter(
|
|||||||
}
|
}
|
||||||
process.stdin.write('q');
|
process.stdin.write('q');
|
||||||
return -1; // discarded
|
return -1; // discarded
|
||||||
}).catchError((Object error) { /* ignore errors here, they will be reported on the next line */ }));
|
})
|
||||||
|
// TODO(srawlins): Fix this static issue,
|
||||||
|
// https://github.com/flutter/flutter/issues/105750.
|
||||||
|
// ignore: body_might_complete_normally_catch_error
|
||||||
|
.catchError((Object error) { /* ignore errors here, they will be reported on the next line */ }));
|
||||||
final int exitCode = await process.exitCode;
|
final int exitCode = await process.exitCode;
|
||||||
if (streamingLogs) {
|
if (streamingLogs) {
|
||||||
debugPrint('${stamp()} (process terminated with exit code $exitCode)');
|
debugPrint('${stamp()} (process terminated with exit code $exitCode)');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user