Skip to content

Commit

Permalink
nicer errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 26, 2022
1 parent 8280233 commit 235036f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/bin/miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,14 +534,14 @@ fn main() {
let filename = param.to_string();
if std::path::Path::new(&filename).exists() {
if let Some(other_filename) = miri_config.external_so_file {
panic!(
"-Zmiri-extern-so-file external SO file is already set to {}",
show_error!(
"-Zmiri-extern-so-file is already set to {}",
other_filename.display()
);
}
miri_config.external_so_file = Some(filename.into());
} else {
panic!("-Zmiri-extern-so-file path {} does not exist", filename);
show_error!("-Zmiri-extern-so-file `{}` does not exist", filename);
}
} else {
// Forward to rustc.
Expand Down
2 changes: 1 addition & 1 deletion src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ impl<'mir, 'tcx> Evaluator<'mir, 'tcx> {
(
unsafe {
libloading::Library::new(lib_file_path)
.expect("Failed to read specified shared object file")
.expect("failed to read specified extern shared object file")
},
lib_file_path.clone(),
)
Expand Down

0 comments on commit 235036f

Please sign in to comment.