From 5f0fc0c00148c6128ee9354ba7360b386a59bef5 Mon Sep 17 00:00:00 2001 From: Fenrir Date: Mon, 31 Jul 2017 23:23:20 -0600 Subject: Add unwinding strategy for panics --- ctr-std/src/sys_common/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ctr-std/src/sys_common/mod.rs') diff --git a/ctr-std/src/sys_common/mod.rs b/ctr-std/src/sys_common/mod.rs index 6f47466..4a7d79f 100644 --- a/ctr-std/src/sys_common/mod.rs +++ b/ctr-std/src/sys_common/mod.rs @@ -77,6 +77,10 @@ pub fn at_exit(f: F) -> Result<(), ()> { if at_exit_imp::push(Box::new(f)) {Ok(())} else {Err(())} } +macro_rules! rtabort { + ($($t:tt)*) => (::sys_common::util::abort(format_args!($($t)*))) +} + // Computes (value*numer)/denom without overflow, as long as both // (numer*denom) and the overall result fit into i64 (which is the case // for our time conversions). -- cgit v1.2.3