Skip to content

Commit

Permalink
Try to harden against a vendor lib issue
Browse files Browse the repository at this point in the history
  • Loading branch information
samsieber committed Jan 31, 2023
1 parent 56c3817 commit 493575a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion atlas-coverage-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ pub fn process_source_map(settings: &Settings, data: PuppeteerData) -> Option<Ve

let source_mapping_path = Path::new(&source_mapping_path);
if source_mapping_path.exists() {
let source_map: SourceMap = util::deserialize_object(source_mapping_path).unwrap();
let source_map: SourceMap = match util::deserialize_object(source_mapping_path) {
Ok(source_map) => source_map,
Err(err) => {
eprintln!("Couldn't deserialize source map for {}", source_mapping_path.to_string_lossy());
eprintln!("{}", err);
return None
},
};

let references = process_references(&settings, &source_map);

Expand Down

0 comments on commit 493575a

Please sign in to comment.