Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Nov 28, 2024
1 parent 26008e6 commit 035ec79
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion shaperglot-cli/src/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ pub struct CheckArgs {
}

pub fn check_command(args: &CheckArgs, language_database: shaperglot::Languages) {
let font_binary = std::fs::read(args.font.as_path()).expect("Failed to read font file");
let font_binary = std::fs::read(args.font.as_path())
.map_err(|e| {
eprintln!("Failed to read font file {}: {}", args.font.display(), e);
std::process::exit(1);
})
.unwrap();
let checker = Checker::new(&font_binary).expect("Failed to load font");
let mut fixes_required = HashMap::new();
for language in args.languages.iter() {
Expand Down

0 comments on commit 035ec79

Please sign in to comment.