Skip to content

Commit

Permalink
Fix error handling in palette_import()
Browse files Browse the repository at this point in the history
  • Loading branch information
CJLove committed May 27, 2020
1 parent ef809cf commit 1b28362
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/palette/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub fn palette_import(g_args: &GlobalArgs, args: &PaletteImportArgs) -> Result<(
include_defaults: false,
sort: false,
};
VeraPalette::derive_from_gpl(&args.id, &args.input_file, &pal_config).expect("Error")
VeraPalette::derive_from_gpl(&args.id, &args.input_file, &pal_config)?
}
false => {
let png_bytes = common::read_file_bin(&args.input_file)?;
Expand All @@ -43,7 +43,7 @@ pub fn palette_import(g_args: &GlobalArgs, args: &PaletteImportArgs) -> Result<(
include_defaults: false,
sort: false,
};
VeraPalette::derive_from_png(&args.id, png_bytes, &pal_config).expect("error")
VeraPalette::derive_from_png(&args.id, png_bytes, &pal_config)?
}
};
// load up the project json
Expand Down

0 comments on commit 1b28362

Please sign in to comment.