1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00
alacritty/src/macros.rs

17 lines
324 B
Rust
Raw Normal View History

#[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");
}
}
}