mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-11 13:51:01 -05:00
17 lines
324 B
Rust
17 lines
324 B
Rust
|
#[macro_export]
|
||
|
macro_rules! die {
|
||
|
($($arg:tt)*) => {
|
||
|
println!($($arg)*);
|
||
|
::std::process::exit(1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#[macro_export]
|
||
|
macro_rules! err_println {
|
||
|
($($arg:tt)*) => {
|
||
|
if let Err(_) = writeln!(&mut ::std::io::stderr(), $($arg)*) {
|
||
|
die!("Cannot reach stderr");
|
||
|
}
|
||
|
}
|
||
|
}
|