Skip to content
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

don't panic on missing page tags #239

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions decodeme/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)
}