diff options
author | Feng Yu <F3n67u@outlook.com> | 2021-10-11 21:21:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 15:21:18 +0200 |
commit | 668b400ff2fa5634f575e54f40ab1f0b78fcdf16 (patch) | |
tree | a5eacaf3e9f4822ea9ace0bc117ebcfd09fc8922 /runtime/errors.rs | |
parent | 423b02d8891c73f1b2864271796b067c81007f50 (diff) |
feat(runtime): improve error messages of runtime fs (#11984)
This commit annotates errors returned from FS Deno APIs to include
paths that were passed to the API calls.
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'runtime/errors.rs')
-rw-r--r-- | runtime/errors.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/errors.rs b/runtime/errors.rs index 79f3c5e7a..fe6e71193 100644 --- a/runtime/errors.rs +++ b/runtime/errors.rs @@ -137,7 +137,7 @@ fn get_hyper_error_class(_error: &hyper::Error) -> &'static str { } #[cfg(unix)] -fn get_nix_error_class(error: &nix::Error) -> &'static str { +pub fn get_nix_error_class(error: &nix::Error) -> &'static str { match error { nix::Error::ECHILD => "NotFound", nix::Error::EINVAL => "TypeError", |