Skip to content

Commit

Permalink
added extra logging
Browse files Browse the repository at this point in the history
  • Loading branch information
FieldofClay committed Feb 18, 2024
1 parent 6f1b0c1 commit 7382423
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ fn main() -> Result<()> {
}
};
let mon = Arc::new(String::from(args[1].to_string()));
if let None = Monitors::get()?
if let None = Monitors::get()
.unwrap_or_else(|err| {
log::error!("Unable to get monitors: {}", err);
std::process::exit(1)
})
.find(|m| m.name == mon.to_string() || mon.to_string() == "ALL" || mon.to_string() == "_")
{
log::error!("Unable to find monitor {mon}");
Expand Down

0 comments on commit 7382423

Please sign in to comment.