Skip to content

Commit ef83fec

Browse files
committed
fix #2937 unhandled error in dart_fn_handle_output when sending message
1 parent 7b40e04 commit ef83fec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frb_rust/src/dart_fn/handler.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ impl DartFnHandler {
5858
let _ = panic::catch_unwind(move || {
5959
let catch_unwind_result = panic::catch_unwind(move || {
6060
if let Some(completer) = (self.completers.lock().unwrap()).remove(&call_id) {
61-
completer.send(message).unwrap();
61+
if let Err(err) = completer.send(message) {
62+
log_warn_or_println(&format!(
63+
"Error in dart_fn_handle_output when sending message for call_id {call_id}: {err:?}"
64+
));
65+
}
6266
}
6367
});
6468
if let Err(err) = catch_unwind_result {

0 commit comments

Comments
 (0)