Skip to content

Commit 235036f

Browse files
committed
nicer errors
1 parent 8280233 commit 235036f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/bin/miri.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,14 +534,14 @@ fn main() {
534534
let filename = param.to_string();
535535
if std::path::Path::new(&filename).exists() {
536536
if let Some(other_filename) = miri_config.external_so_file {
537-
panic!(
538-
"-Zmiri-extern-so-file external SO file is already set to {}",
537+
show_error!(
538+
"-Zmiri-extern-so-file is already set to {}",
539539
other_filename.display()
540540
);
541541
}
542542
miri_config.external_so_file = Some(filename.into());
543543
} else {
544-
panic!("-Zmiri-extern-so-file path {} does not exist", filename);
544+
show_error!("-Zmiri-extern-so-file `{}` does not exist", filename);
545545
}
546546
} else {
547547
// Forward to rustc.

src/machine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ impl<'mir, 'tcx> Evaluator<'mir, 'tcx> {
431431
(
432432
unsafe {
433433
libloading::Library::new(lib_file_path)
434-
.expect("Failed to read specified shared object file")
434+
.expect("failed to read specified extern shared object file")
435435
},
436436
lib_file_path.clone(),
437437
)

0 commit comments

Comments
 (0)