cfg_panic! {
pub mod crash_handler;
pub use crash_handler::*;
pub mod bad_modules;
pub use bad_modules::*;
}
#[cfg(feature = "panic")]
pub fn reattach_windows_terminal() {
#[cfg(windows)]
{
use windows_sys::Win32::System::Console::{AttachConsole, ATTACH_PARENT_PROCESS};
let _ = unsafe { AttachConsole(ATTACH_PARENT_PROCESS) };
}
}
#[cfg(feature = "panic")]
#[cfg(panic = "abort")]
#[cfg(not(any(feature = "log", feature = "tracing")))]
compile_error!("Feature 'panic' requires either 'log' or 'tracing' to be enabled.");