1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//! Panic messages for humans
//!
//! Reduce the effort for users to report panics back to you
//!
//! You can still get the raw output by either:
//! - Running a debug build
//! - Setting `RUST_BACKTRACE=1`
//!
//! ## Example
//!
//! Add to your `fn main()`:
//! ```rust
//! human_panic::setup_panic!();
//! ```
//!
//! When run locally in a release build:
//! ```txt
//! my-program had a problem and crashed. To help us diagnose the problem you can send us a crash report.
//!
//! We have generated a report file at "/var/folders/zw/bpfvmq390lv2c6gn_6byyv0w0000gn/T/report-8351cad6-d2b5-4fe8-accd-1fcbf4538792.toml". Submit an issue or email with the subject of "human-panic Crash Report" and include the report as an attachment.
//!
//! - Homepage: https://github.com/rust-ci/human-panic
//! - Authors: Yoshua Wuyts <yoshuawuyts@gmail.com>
//!
//! We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.
//!
//! Thank you kindly!
//! ```
//!
//! Traditional output:
//! ```txt
//! thread 'main' panicked at 'oops', examples/main.rs:2:3
//! note: Run with `RUST_BACKTRACE=1` for a backtrace.
//! ```
;
pub use Metadata;
pub use PanicStyle;
pub use handle_dump;
pub use print_msg;
pub use setup_panic;
/// Collect Cargo [`Metadata`]
///
/// ## Example
///
/// ```rust
/// use human_panic::metadata;
///
/// let metadata = metadata!()
/// .support("- Open a support request by email to support@mycompany.com");
/// ```
/// Register `human-panic`
///
/// The macro should be called from within a function, for example as the first line of the
/// `main()` function of the program.
///
/// ## Example
///
/// Default [`metadata!`]
/// ```rust
/// use human_panic::setup_panic;
///
/// setup_panic!();
/// ```
///
/// Extend or override default [`metadata!`]
/// ```rust
/// use human_panic::setup_panic;
/// use human_panic::metadata;
///
/// setup_panic!(metadata!()
/// .authors("My Company Support <support@mycompany.com>")
/// .support("- Open a support request by email to support@mycompany.com")
/// );
/// ```