about summary refs log tree commit diff
path: root/src/libstd/panic.rs
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2016-03-15 19:42:45 -0700
committerSteven Fackler <sfackler@gmail.com>2016-03-15 20:51:48 -0700
commit159eae8b8b32f76c1ae945cdfc52fb77ffc01d52 (patch)
tree7f416a442020ae4b981ec1973b1176a443d821c5 /src/libstd/panic.rs
parent74dfc1ddd9d6a9f541bc526c3401b92bcd16bd2b (diff)
downloadrust-159eae8b8b32f76c1ae945cdfc52fb77ffc01d52.tar.gz
rust-159eae8b8b32f76c1ae945cdfc52fb77ffc01d52.zip
Rename panic handlers to panic hook
Diffstat (limited to 'src/libstd/panic.rs')
-rw-r--r--src/libstd/panic.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs
index 5c2e36623cb..56d638d9df3 100644
--- a/src/libstd/panic.rs
+++ b/src/libstd/panic.rs
@@ -23,7 +23,21 @@ use sync::{Arc, Mutex, RwLock};
 use sys_common::unwind;
 use thread::Result;
 
-pub use panicking::{take_handler, set_handler, PanicInfo, Location};
+pub use panicking::{take_hook, set_hook, PanicInfo, Location};
+
+///
+#[rustc_deprecated(since = "1.9.0", reason = "renamed to set_hook")]
+#[unstable(feature = "panic_handler", reason = "awaiting feedback", issue = "30449")]
+pub fn set_handler<F>(handler: F) where F: Fn(&PanicInfo) + 'static + Sync + Send {
+    set_hook(handler)
+}
+
+///
+#[rustc_deprecated(since = "1.9.0", reason = "renamed to take_hook")]
+#[unstable(feature = "panic_handler", reason = "awaiting feedback", issue = "30449")]
+pub fn take_handler() -> Box<Fn(&PanicInfo) + 'static + Sync + Send> {
+    take_hook()
+}
 
 /// A marker trait which represents "panic safe" types in Rust.
 ///