Skip to content

Commit

Permalink
don't panic on missing page tags (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd authored Dec 22, 2024
1 parent 476f9b5 commit 1bbbc64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions decodeme/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ impl EventDecoder {

let string_data = split_data
.remove(&PageTag::StringData)
.expect("Invalid file: No string data found");
.ok_or("Invalid file: No string data found")?;
let index_data = split_data
.remove(&PageTag::StringIndex)
.expect("Invalid file: No string index data found");
.ok_or("Invalid file: No string index data found")?;
let event_data = split_data
.remove(&PageTag::Events)
.expect("Invalid file: No event data found");
.ok_or("Invalid file: No event data found")?;

Self::from_separate_buffers(string_data, index_data, event_data, diagnostic_file_path)
}
Expand Down

0 comments on commit 1bbbc64

Please sign in to comment.