From 668b400ff2fa5634f575e54f40ab1f0b78fcdf16 Mon Sep 17 00:00:00 2001 From: Feng Yu Date: Mon, 11 Oct 2021 21:21:18 +0800 Subject: feat(runtime): improve error messages of runtime fs (#11984) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- runtime/errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/errors.rs') 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", -- cgit v1.2.3