Skip to content

Commit

Permalink
feat(general): Add thread.errored attribute (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-auer authored Nov 13, 2019
1 parent 28027f5 commit 03b3c39
Show file tree
Hide file tree
Showing 5 changed files with 1,157 additions and 1 deletion.
7 changes: 6 additions & 1 deletion general/src/protocol/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,15 @@ pub struct Thread {
#[metastructure(skip_serialization = "empty")]
pub raw_stacktrace: Annotated<RawStacktrace>,

/// Indicates that this thread requested the event (usually by crashing).
/// Indicates that this thread crashed (likely also crashing the application).
pub crashed: Annotated<bool>,

/// Indicates that the thread was not suspended when the event was created.
pub current: Annotated<bool>,

/// Indicates that this thread errored, which caused this event.
pub errored: Annotated<bool>,

/// Additional arbitrary fields for forwards compatibility.
#[metastructure(additional_properties)]
pub other: Object<Value>,
Expand Down Expand Up @@ -130,6 +133,7 @@ fn test_thread_roundtrip() {
"name": "myname",
"crashed": true,
"current": true,
"errored": true,
"other": "value"
}"#;
let thread = Annotated::new(Thread {
Expand All @@ -139,6 +143,7 @@ fn test_thread_roundtrip() {
raw_stacktrace: Annotated::empty(),
crashed: Annotated::new(true),
current: Annotated::new(true),
errored: Annotated::new(true),
other: {
let mut map = Map::new();
map.insert(
Expand Down
Loading

0 comments on commit 03b3c39

Please sign in to comment.