summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-03-28 00:31:46 +0800
committerKeuin <[email protected]>2022-03-28 00:31:46 +0800
commit80c482d51d766680e852d802a163bb3ffc51fd78 (patch)
treead1fa587214a572addc75de4bcd6e5f0a95f38ff
parentb611e395a2d002c0696c2c10e2f43b3f9013c6d9 (diff)
Panic with message.
-rw-r--r--src/config.rs6
1 files changed, 3 insertions, 3 deletions
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