Skip to content

Commit

Permalink
Print name of svg on parse failure (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
ratmice authored Feb 20, 2024
1 parent eb5255e commit 0f1ec38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/scenes/src/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub fn svg_function_of<R: AsRef<str>>(
fn render_svg_contents(name: &str, contents: &str) -> (Scene, Vec2) {
let start = Instant::now();
let svg = usvg::Tree::from_str(contents, &usvg::Options::default())
.expect("failed to parse svg file");
.unwrap_or_else(|e| panic!("failed to parse svg file {name}: {e}"));
eprintln!("Parsed svg {name} in {:?}", start.elapsed());
let start = Instant::now();
let mut new_scene = Scene::new();
Expand Down

0 comments on commit 0f1ec38

Please sign in to comment.