Skip to content

Commit

Permalink
try this. If it goes red, I'll roll back.
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Sep 9, 2020
1 parent 94ac53e commit fd14020
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,11 @@ fn get_url_parse_error_class(_error: &url::ParseError) -> &'static str {
fn get_nix_error_class(error: &nix::Error) -> &'static str {
use nix::errno::Errno::*;
match error {
nix::Error::Sys(EPERM) => "PermissionDenied",
nix::Error::Sys(ECHILD) => "NotFound",
nix::Error::Sys(EINVAL) => "TypeError",
nix::Error::Sys(ENOENT) => "NotFound",
nix::Error::Sys(ENOTTY) => "BadResource",
nix::Error::Sys(EPERM) => "PermissionDenied",
nix::Error::Sys(UnknownErrno) => "Error",
nix::Error::Sys(_) => "Error",
nix::Error::InvalidPath => "TypeError",
Expand Down
1 change: 1 addition & 0 deletions cli/tests/unit/process_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ unitTest(

assertThrows(
() => p.kill(Deno.Signal.SIGQUIT),
Deno.errors.NotFound,
);

p.close();
Expand Down

0 comments on commit fd14020

Please sign in to comment.