Skip to content
Permalink
Browse files
fail -> panic in src/libnative
  • Loading branch information
steveklabnik committed Oct 28, 2014
1 parent 992b60e commit 890192a848b4250dc257d6d419a229b25d52a82d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
@@ -710,7 +710,7 @@ impl UnixAcceptor {
if new_handle == libc::INVALID_HANDLE_VALUE {
let ret = Err(super::last_error());
// If our disconnection fails, then there's not really a whole lot
// that we can do, so fail the task.
// that we can do, so cause a panic.

This comment has been minimized.

Copy link
@aturon

aturon Oct 28, 2014

"so panic."

This comment has been minimized.

Copy link
@steveklabnik

steveklabnik Oct 28, 2014

Author Owner

so panic, wow

doge

This comment has been minimized.

Copy link
@aturon

aturon Oct 28, 2014

zomg this made my day

let err = unsafe { libc::DisconnectNamedPipe(handle) };
assert!(err != 0);
return ret;
@@ -194,7 +194,7 @@ fn helper(input: libc::c_int, messages: Receiver<Req>, _: ()) {
}

-1 if os::errno() == libc::EINTR as int => {}
n => panic!("helper thread failed in select() with error: {} ({})",
n => panic!("helper thread panicked in select() with error: {} ({})",
n, os::last_os_error())
}
}
@@ -142,7 +142,7 @@ pub fn start(argc: int, argv: *const *const u8, main: proc()) -> int {
exit_code = Some(run(main.take().unwrap()));
}).destroy());
unsafe { rt::cleanup(); }
// If the exit code wasn't set, then the task block must have failed.
// If the exit code wasn't set, then the task block must have panicked.
return exit_code.unwrap_or(rt::DEFAULT_ERROR_CODE);
}

@@ -297,7 +297,7 @@ mod tests {
}

#[test]
fn smoke_fail() {
fn smoke_panic() {
let (tx, rx) = channel::<()>();
spawn(proc() {
let _tx = tx;
@@ -318,7 +318,7 @@ mod tests {
}

#[test]
fn smoke_opts_fail() {
fn smoke_opts_panic() {
let mut opts = TaskOpts::new();
let (tx, rx) = channel();
opts.on_exit = Some(proc(r) tx.send(r));

1 comment on commit 890192a

@aturon
Copy link

@aturon aturon commented on 890192a Oct 28, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

Please sign in to comment.