Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
f104be7a
Unverified
Commit
f104be7a
authored
Jun 16, 2022
by
Sam Rawlins
Committed by
GitHub
Jun 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore body_might_complete_normally_catch_error violations (#105795)
parent
32b22b85
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
3 deletions
+24
-3
test_default_binary_messenger.dart
...s/flutter_test/lib/src/test_default_binary_messenger.dart
+3
-0
test_default_binary_messenger_test.dart
...flutter_test/test/test_default_binary_messenger_test.dart
+3
-0
devices.dart
packages/flutter_tools/lib/src/proxied_devices/devices.dart
+10
-2
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+3
-0
overall_experience_test.dart
...tools/test/integration.shard/overall_experience_test.dart
+5
-1
No files found.
packages/flutter_test/lib/src/test_default_binary_messenger.dart
View file @
f104be7a
...
...
@@ -141,6 +141,9 @@ class TestDefaultBinaryMessenger extends BinaryMessenger {
if
(
resultFuture
!=
null
)
{
_pendingMessages
.
add
(
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 */
})
.
whenComplete
(()
=>
_pendingMessages
.
remove
(
resultFuture
));
}
...
...
packages/flutter_test/test/test_default_binary_messenger_test.dart
View file @
f104be7a
...
...
@@ -45,6 +45,9 @@ void main() {
final
BinaryMessenger
delegate
=
TestDelegate
();
final
Future
<
ByteData
?>?
future
=
delegate
.
send
(
''
,
null
);
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
)
{
});
try
{
await
TestDefaultBinaryMessenger
(
delegate
).
send
(
''
,
null
);
...
...
packages/flutter_tools/lib/src/proxied_devices/devices.dart
View file @
f104be7a
...
...
@@ -520,7 +520,11 @@ class ProxiedPortForwarder extends DevicePortForwarder {
socket
.
listen
((
Uint8List
data
)
{
unawaited
(
connection
.
sendRequest
(
'proxy.write'
,
<
String
,
Object
>{
'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
// crash the tool. If this is critical, the place where the connection
// is being used would crash.
...
...
@@ -537,7 +541,11 @@ class ProxiedPortForwarder extends DevicePortForwarder {
// Send a proxy disconnect event just in case.
unawaited
(
connection
.
sendRequest
(
'proxy.disconnect'
,
<
String
,
Object
>{
'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
// remote end also disconnects. In any case, this request is just to
// notify the remote end to disconnect and we should not crash when
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
f104be7a
...
...
@@ -288,6 +288,9 @@ Future<vm_service.VmService> setUpVmService(
// thrown if we're already subscribed.
registrationRequests
.
add
(
vmService
.
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
)
);
}
...
...
packages/flutter_tools/test/integration.shard/overall_experience_test.dart
View file @
f104be7a
...
...
@@ -297,7 +297,11 @@ Future<ProcessTestResult> runFlutter(
}
process
.
stdin
.
write
(
'q'
);
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
;
if
(
streamingLogs
)
{
debugPrint
(
'
${stamp()}
(process terminated with exit code
$exitCode
)'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment