mirror of
https://github.com/denoland/deno.git
synced 2025-03-09 21:57:40 -04:00
fix
This commit is contained in:
parent
37982f662f
commit
37efd2a15b
1 changed files with 1 additions and 2 deletions
|
@ -138,7 +138,6 @@ fn get_hyper_error_class(_error: &hyper::Error) -> &'static str {
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
fn get_nix_error_class(error: &nix::Error) -> &'static str {
|
fn get_nix_error_class(error: &nix::Error) -> &'static str {
|
||||||
use nix::errno::Errno::*;
|
|
||||||
match error {
|
match error {
|
||||||
nix::Error::ECHILD => "NotFound",
|
nix::Error::ECHILD => "NotFound",
|
||||||
nix::Error::EINVAL => "TypeError",
|
nix::Error::EINVAL => "TypeError",
|
||||||
|
@ -146,7 +145,7 @@ fn get_nix_error_class(error: &nix::Error) -> &'static str {
|
||||||
nix::Error::ENOTTY => "BadResource",
|
nix::Error::ENOTTY => "BadResource",
|
||||||
nix::Error::EPERM => "PermissionDenied",
|
nix::Error::EPERM => "PermissionDenied",
|
||||||
nix::Error::ESRCH => "NotFound",
|
nix::Error::ESRCH => "NotFound",
|
||||||
nix::Error::Sys::UnknownErrno => "Error",
|
nix::Error::UnknownErrno => "Error",
|
||||||
nix::Error::ENOTSUP => unreachable!(),
|
nix::Error::ENOTSUP => unreachable!(),
|
||||||
_ => "Error",
|
_ => "Error",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue