-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding dump file #25
Adding dump file #25
Changes from 5 commits
f18366f
25bc94d
9af2799
92cd808
f5cc70a
fafb46b
fc8b97a
45cabff
1785e49
ee8f742
d409416
6c3932f
8b0ae5b
f22c1ee
44ca0ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.rs] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.toml] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ repository = "https://github.com/yoshuawuyts/human-panic" | |
homepage = "https://github.com/yoshuawuyts/human-panic" | ||
documentation = "https://docs.rs/human-panic" | ||
description = "Panic messages for humans" | ||
authors = ["Yoshua Wuyts <[email protected]>", | ||
authors = ["Yoshua Wuyts <[email protected]>", | ||
"Pascal Hertleif <[email protected]>", | ||
"Katharina Fey <[email protected]>"] | ||
readme = "README.md" | ||
|
@@ -27,3 +27,8 @@ backtrace = "0.3" | |
|
||
[features] | ||
nightly = [] | ||
|
||
[workspace] | ||
members = [ | ||
"tests/single-panic", | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,49 @@ We take privacy seriously, and do not perform any automated error collection. In | |
Thank you kindly! | ||
``` | ||
|
||
The error dump file generated by `human-panic` contains the following fields. | ||
|
||
```norun | ||
name = 'single-panic-test' | ||
operating_system = 'unix:Unknown' | ||
crate_version = '0.1.0' | ||
explanation = ''' | ||
Cause: OMG EVERYTHING IS ON FIRE!!!. Panic occurred in file 'tests/single-panic/src/main.rs' at line 8 | ||
''' | ||
method = 'Panic' | ||
backtrace = ''' | ||
stack backtrace: | ||
0: 0x55fa0ed4c1b4 - backtrace::backtrace::libunwind::trace::h69e50feca54bfb84 | ||
at /home/spacekookie/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.6/src/backtrace/libunwind.rs:53 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can't reproduce this output locally, it says There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh Pascal.... 😅 |
||
- backtrace::backtrace::trace::h42967341e0b01ccc | ||
at /home/spacekookie/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.6/src/backtrace/mod.rs:42 | ||
|
||
# ... | ||
|
||
8: 0x55fa0ebaac8d - single_panic_test::main::h56a3d326bcecfc36 | ||
at tests/single-panic/src/main.rs:8 | ||
9: 0x55fa0ebaae91 - std::rt::lang_start::{{closure}}::h09d28d8540038bf8 | ||
at /checkout/src/libstd/rt.rs:74 | ||
10: 0x55fa0ed732f7 - std::rt::lang_start_internal::{{closure}}::h2e4baf0a27c956a3 | ||
at libstd/rt.rs:59 | ||
- std::panicking::try::do_call::h73f98ed0647c7274 | ||
at libstd/panicking.rs:305 | ||
11: 0x55fa0ed8551e - __rust_maybe_catch_panic | ||
at libpanic_unwind/lib.rs:101 | ||
12: 0x55fa0ed6f7f5 - std::panicking::try::h18fbb145180d4cd9 | ||
at libstd/panicking.rs:284 | ||
- std::panic::catch_unwind::hc4b6a212a30b4bc5 | ||
at libstd/panic.rs:361 | ||
- std::rt::lang_start_internal::h8b001b4244930d51 | ||
at libstd/rt.rs:58 | ||
13: 0x55fa0ebaae71 - std::rt::lang_start::h1b1de624209f414a | ||
at /checkout/src/libstd/rt.rs:74 | ||
14: 0x55fa0ebaacbd - main | ||
15: 0x7f9946132f29 - __libc_start_main | ||
16: 0x55fa0eba9b79 - _start | ||
17: 0x0 - <unknown>''' | ||
``` | ||
|
||
## Usage | ||
|
||
```rust no_run | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "single-panic-test" | ||
version = "0.1.0" | ||
authors = ["Human Panic Authors <[email protected]>"] | ||
|
||
[dependencies] | ||
human-panic = { path = "../.." } | ||
|
||
[dev-dependencies] | ||
assert_cli = "0.5.4" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
extern crate assert_cli; | ||
|
||
#[test] | ||
fn integration() { | ||
assert_cli::Assert::main_binary() | ||
.stderr() | ||
.contains("single-panic-test") | ||
.stderr() | ||
.contains("Human Panic Authors") | ||
.stderr() | ||
.contains("[email protected]") | ||
.fails_with(101) | ||
.unwrap(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rustdoc assumes code to be
rust
(makes sense), so instead ofnorun
you should probably set it totoml
which would be more correct and more highlighted on github