Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail -> panic #2

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/sbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl Allocator for GuardedHeapAllocator {
0);
if ptr == MAP_FAILED {
let errno = os::errno();
fail!("mmap failed: {} ({})",
panic!("mmap failed: {} ({})",
os::error_string(errno as uint), errno);
}

Expand All @@ -119,7 +119,7 @@ impl Allocator for GuardedHeapAllocator {
PROT_NONE);
if ret != 0 {
let errno = os::errno();
fail!("mprotect failed: {} ({})",
panic!("mprotect failed: {} ({})",
os::error_string(errno as uint), errno);
}

Expand All @@ -129,7 +129,7 @@ impl Allocator for GuardedHeapAllocator {
PROT_NONE);
if ret != 0 {
let errno = os::errno();
fail!("mprotect failed: {} ({})",
panic!("mprotect failed: {} ({})",
os::error_string(errno as uint), errno);
}

Expand All @@ -147,7 +147,7 @@ impl Allocator for GuardedHeapAllocator {
full_size as size_t);
if ret != 0 {
let errno = os::errno();
fail!("munmap failed: {} ({})",
panic!("munmap failed: {} ({})",
os::error_string(errno as uint), errno);
}
}
Expand Down Expand Up @@ -176,7 +176,7 @@ mod impadv {
// There should be a better way to check for the availability
// of this flag in the kernel and in the libc.
if errno != EINVAL as int {
fail!("madvise failed: {} ({})",
panic!("madvise failed: {} ({})",
os::error_string(errno as uint), errno);
}
}
Expand All @@ -197,7 +197,7 @@ mod impadv {
MADV_ZERO_WIRED_PAGES);
if ret != 0 {
let errno = os::errno();
fail!("madvise failed: {} ({})",
panic!("madvise failed: {} ({})",
os::error_string(errno as uint), errno);
}
}
Expand Down Expand Up @@ -233,7 +233,7 @@ mod impinh {
inherit_none);
if ret != 0 {
let errno = os::errno();
fail!("minherit failed: {} ({})",
panic!("minherit failed: {} ({})",
os::error_string(errno as uint), errno);
}
}
Expand Down Expand Up @@ -263,7 +263,7 @@ unsafe fn alloc<A: Allocator, T>(count: uint) -> *mut T {
let ret = mman::mlock(ptr as *const c_void, size as size_t);
if ret != 0 {
let errno = os::errno();
fail!("mlock failed: {} ({})",
panic!("mlock failed: {} ({})",
os::error_string(errno as uint), errno);
}

Expand Down Expand Up @@ -293,7 +293,7 @@ unsafe fn dealloc<A: Allocator, T>(ptr: *mut T, count: uint) {
let ret = mman::munlock(ptr as *const c_void, size as size_t);
if ret != 0 {
let errno = os::errno();
fail!("munlock failed: {} ({})",
panic!("munlock failed: {} ({})",
os::error_string(errno as uint), errno);
}

Expand Down