From 80c482d51d766680e852d802a163bb3ffc51fd78 Mon Sep 17 00:00:00 2001 From: Keuin Date: Mon, 28 Mar 2022 00:31:46 +0800 Subject: Panic with message. --- src/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/config.rs b/src/config.rs index 99e5f3d..c7549ef 100644 --- a/src/config.rs +++ b/src/config.rs @@ -19,17 +19,17 @@ impl Config { let mut file = File::open(file_path) .unwrap_or_else(|err| { error!("Cannot open config file {}: {:?}", file_path, err); - panic!(); + panic!("Cannot open config file {}: {:?}", file_path, err); }); let mut config = String::new(); file.read_to_string(&mut config) .unwrap_or_else(|err| { error!("Cannot read config file {}: {:?}.", file_path, err); - panic!(); + panic!("Cannot read config file {}: {:?}.", file_path, err); }); return serde_json::from_str(config.as_str()).unwrap_or_else(|err| { error!("Cannot decode config file: {:?}.", err); - panic!(); + panic!("Cannot decode config file: {:?}.", err); }); } } \ No newline at end of file -- cgit v1.2.3