summaryrefslogtreecommitdiff
path: root/cli/errors.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-02-15 13:20:40 -0500
committerGitHub <noreply@github.com>2023-02-15 13:20:40 -0500
commitc4b9a91e27a32c0949688034c2449936c01a44a9 (patch)
treeb274b83aa8a84428f3d1401535845e24969108c0 /cli/errors.rs
parentb34e751a5b2193e8ce65203386e00147c08a7a64 (diff)
refactor: use deno_graph's semver and npm structs (#17791)
Diffstat (limited to 'cli/errors.rs')
-rw-r--r--cli/errors.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/cli/errors.rs b/cli/errors.rs
index 4dc22efbf..3ec17e8b2 100644
--- a/cli/errors.rs
+++ b/cli/errors.rs
@@ -65,11 +65,13 @@ pub fn get_error_class_name(e: &AnyError) -> &'static str {
.map(get_resolution_error_class)
})
.unwrap_or_else(|| {
- eprintln!(
- "Error '{}' contains boxed error of unknown type:{}",
- e,
- e.chain().map(|e| format!("\n {e:?}")).collect::<String>()
- );
+ if cfg!(debug) {
+ log::warn!(
+ "Error '{}' contains boxed error of unknown type:{}",
+ e,
+ e.chain().map(|e| format!("\n {e:?}")).collect::<String>()
+ );
+ }
"Error"
})
}