#![doc = include_str!("../README.md")]
#![deny(missing_docs, missing_debug_implementations)]
#![no_std]
#[cfg(not(test))]
use core::panic::PanicInfo;
#[cfg(not(test))]
use mc_sgx_panic_sys::panic_count;
#[cfg(feature = "log")]
mod log;
#[cfg(not(test))]
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
extern "C" {
fn abort() -> !;
}
let panics = panic_count::increase();
if panics > 1 {
unsafe { abort() }
}
#[cfg(feature = "log")]
log::log_panic_info(_info);
unsafe { abort() }
}