Add missing newline character to callers of dumb_print

This commit is contained in:
Amanieu d'Antras 2016-01-09 19:19:56 +00:00
parent 757f57bb1e
commit 98bef2b818
3 changed files with 5 additions and 5 deletions

View File

@ -206,7 +206,7 @@ pub fn on_panic(obj: &(Any+Send), file: &'static str, line: u32) {
// debugger provides a useable stacktrace.
if panics >= 3 {
util::dumb_print(format_args!("thread panicked while processing \
panic. aborting."));
panic. aborting.\n"));
unsafe { intrinsics::abort() }
}
@ -232,7 +232,7 @@ pub fn on_panic(obj: &(Any+Send), file: &'static str, line: u32) {
// just abort. In the future we may consider resuming
// unwinding or otherwise exiting the thread cleanly.
util::dumb_print(format_args!("thread panicked while panicking. \
aborting."));
aborting.\n"));
unsafe { intrinsics::abort() }
}
}

View File

@ -35,12 +35,12 @@ pub fn dumb_print(args: fmt::Arguments) {
}
pub fn abort(args: fmt::Arguments) -> ! {
dumb_print(format_args!("fatal runtime error: {}", args));
dumb_print(format_args!("fatal runtime error: {}\n", args));
unsafe { intrinsics::abort(); }
}
#[allow(dead_code)] // stack overflow detection not enabled on all platforms
pub unsafe fn report_overflow() {
dumb_print(format_args!("\nthread '{}' has overflowed its stack",
dumb_print(format_args!("\nthread '{}' has overflowed its stack\n",
thread::current().name().unwrap_or("<unknown>")));
}

View File

@ -53,7 +53,7 @@ fn oom_handler() -> ! {
// is no need to check the result of GetStdHandle.
c::WriteFile(c::GetStdHandle(c::STD_ERROR_HANDLE),
msg.as_ptr() as c::LPVOID,
msg.len() as DWORD,
msg.len() as c::DWORD,
ptr::null_mut(),
ptr::null_mut());
intrinsics::abort();