Skip to content

Commit

Permalink
Implement error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Camerooooon committed Sep 10, 2022
1 parent 84b7e1a commit 5dbb95f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ impl Getter for Get {
}

fn thermal(&self, raw: bool) {
let zones = read_thermal_zones();
let zones = match read_thermal_zones() {
Ok(zones) => zones,
Err(error) => {
println!("Error: {:?}", error);
return;
}
};
if raw {
println!("{:?}", zones)
} else {
Expand Down

0 comments on commit 5dbb95f

Please sign in to comment.