Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Apr 13, 2022
1 parent 5e8e264 commit 136507a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/fj-app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod config;

use std::path::PathBuf;

use anyhow::anyhow;
use anyhow::{anyhow, Context as _};
use fj_export::export;
use fj_host::{Model, Parameters};
use fj_operations::shape_processor::ShapeProcessor;
Expand Down Expand Up @@ -39,7 +39,8 @@ fn main() -> anyhow::Result<()> {
})?;
path.push(model);

let model = Model::from_path(path, config.target_dir)?;
let model = Model::from_path(path.clone(), config.target_dir)
.with_context(|| format!("Failed to load model: {}", path.display()))?;
let parameters = args.parameters.unwrap_or_else(Parameters::empty);

let shape_processor = ShapeProcessor {
Expand Down

0 comments on commit 136507a

Please sign in to comment.