std::panic
API 참조는 영어로만 있습니다. 표준 라이브러리 소스의 영어 문서 주석에서 만듭니다.
a hook that sees every panic before the process ends
(or, under #[on_panic], before the C caller gets its value back).
A library that C, Python or another host loads aborts on a panic instead of exiting: the hook is its chance to log first.
Structs
PanicInfoSource
pub struct PanicInfoWhat panicked: the message and, when known, path:line:col.
Trait implementations 1
impl Debug for PanicInfo
Functions
set_hookSource
pub fn set_hook(hook: fn(PanicInfo)) Run hook on every panic in the process from now on, on the
panicking thread, after the report is printed. A panic inside the hook
is not reported to it again.
take_hookSource
pub fn take_hook() Remove the hook set_hook installed.