aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 14b193d..8647734 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -24,8 +24,6 @@
*
* Forecast
*
- * Handle "no socket file" more gracefully
- *
*/
use std::error;
@@ -295,8 +293,10 @@ fn main() {
sleep(Duration::from_millis(cycle*delay_ms) - start.elapsed());
}
} else {
- let state = get_state(args.socket).unwrap();
- println!("{:#?}", state)
+ match get_state(args.socket.clone()) {
+ Ok(state) => println!("{:#?}", state),
+ Err(_) => eprintln!("Couldn't open {}", &args.socket)
+ }
}
}