feat: resort to printing error if sending notification fails
This commit is contained in:
parent
a841321638
commit
65f389c81e
1 changed files with 4 additions and 2 deletions
|
|
@ -3,11 +3,13 @@ use std::time::Duration;
|
|||
use notify_rust::Notification;
|
||||
|
||||
pub fn send_error_notification(body: &str) {
|
||||
Notification::new()
|
||||
if let Err(e) = Notification::new()
|
||||
.summary("Computer Statistics Error")
|
||||
.body(body)
|
||||
.icon("dialog-error")
|
||||
.timeout(Duration::from_millis(60000))
|
||||
.show()
|
||||
.unwrap();
|
||||
{
|
||||
eprintln!("Failed to send error notification: {}", e);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue