docs

v0.1.2 문서를 보고 있습니다. 이 버전은 더 이상 지원하지 않습니다. 최신 릴리스: v0.1.3 →

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 PanicInfo

What panicked: the message and, when known, path:line:col.

Trait implementations 1

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.