From 28413324e8a30ce74defaf1d048f1fe4bfc1d4f9 Mon Sep 17 00:00:00 2001 From: Kentaro Okuda Date: Sun, 19 Feb 2023 07:27:54 -0500 Subject: [PATCH] Handle Result This function can fail if we fail to set up a graphics context. --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index a7cbbb8..d64075d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -209,7 +209,7 @@ fn main() { let gui_connected_lock = connected_lock.clone(); let gui_print_lock = print_lock.clone(); - eframe::run_native( + if let Err(e) = eframe::run_native( "Serial Monitor", options, Box::new(|_cc| { @@ -227,7 +227,9 @@ fn main() { clear_tx, )) }), - ); + ) { + println!("error: {e:?}"); + } }