-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VWS] Pop msgbox saying "Cannot use custom caps from MFEKglif."
…instead of crashing.
- Loading branch information
1 parent
1d01bea
commit 72e118d
Showing
4 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
macro_rules! gui_error { | ||
($($format_args:tt),*) => { | ||
use log; | ||
use msgbox::{self, IconType::*}; | ||
use std::thread; | ||
log::error!($($format_args),*); | ||
thread::spawn(|| { | ||
match msgbox::create("MFEKglif critical error", &format!($($format_args),*), Error) { | ||
Ok(_) => log::trace!("Opened crash msgbox successfully"), | ||
Err(e) => log::error!("Failed to create error box! {:?}", e), | ||
} | ||
}); | ||
} | ||
} | ||
pub(crate) use gui_error; |