Rename panic handlers to panic hook
This commit is contained in:
parent
74dfc1ddd9
commit
159eae8b8b
2 changed files with 46 additions and 33 deletions
|
@ -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.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue