Skip to content

Commit 5a2a08d

Browse files
committed
Tweak error printing
* Don't print "Internal" for the error since it's not internal most likely * Don't panic, instead just immediately exit
1 parent 07eec55 commit 5a2a08d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2399,7 +2399,8 @@ fn spawn(cmd: &mut Command, program: &str) -> Result<(Child, JoinHandle<()>), Er
23992399
}
24002400

24012401
fn fail(s: &str) -> ! {
2402-
panic!("\n\nInternal error occurred: {}\n\n", s)
2402+
eprintln!("\n\nerror occurred: {}\n\n", s);
2403+
std::process::exit(1);
24032404
}
24042405

24052406
fn command_add_output_file(cmd: &mut Command, dst: &Path, msvc: bool, is_asm: bool, is_arm: bool) {

0 commit comments

Comments
 (0)