mirror of
https://github.com/lisk77/comet.git
synced 2025-12-12 09:08:49 +00:00
fix(log): fatal log message now exits the system and never returns
This commit is contained in:
parent
8aec280447
commit
90e514f642
1 changed files with 3 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ macro_rules! error {
|
|||
|
||||
#[macro_export]
|
||||
macro_rules! fatal {
|
||||
($fmt:expr $(, $args:expr)*) => {
|
||||
($fmt:expr $(, $args:expr)*) => {{
|
||||
eprintln!(
|
||||
"{} [{}::{}] [{}] : {}",
|
||||
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
|
||||
|
|
@ -66,7 +66,8 @@ macro_rules! fatal {
|
|||
"\x1b[41mFATAL\x1b[0m",
|
||||
format!($fmt $(, $args)*)
|
||||
);
|
||||
};
|
||||
std::process::exit(1)
|
||||
}};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue