summaryrefslogtreecommitdiff
path: root/cli/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/errors.rs')
-rw-r--r--cli/errors.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/cli/errors.rs b/cli/errors.rs
index fbf9da8e0..2b5d19503 100644
--- a/cli/errors.rs
+++ b/cli/errors.rs
@@ -9,8 +9,6 @@
//! Diagnostics are compile-time type errors, whereas JsErrors are runtime
//! exceptions.
-use crate::emit::GraphError;
-
use deno_ast::Diagnostic;
use deno_core::error::AnyError;
use deno_graph::ModuleGraphError;
@@ -25,11 +23,7 @@ fn get_diagnostic_class(_: &Diagnostic) -> &'static str {
"SyntaxError"
}
-fn get_graph_error_class(err: &GraphError) -> &'static str {
- get_module_graph_error_class(&err.0)
-}
-
-pub fn get_module_graph_error_class(err: &ModuleGraphError) -> &'static str {
+fn get_module_graph_error_class(err: &ModuleGraphError) -> &'static str {
match err {
ModuleGraphError::LoadingErr(_, err) => get_error_class_name(err.as_ref()),
ModuleGraphError::InvalidSource(_, _)
@@ -60,7 +54,6 @@ pub fn get_error_class_name(e: &AnyError) -> &'static str {
.map(get_import_map_error_class)
})
.or_else(|| e.downcast_ref::<Diagnostic>().map(get_diagnostic_class))
- .or_else(|| e.downcast_ref::<GraphError>().map(get_graph_error_class))
.or_else(|| {
e.downcast_ref::<ModuleGraphError>()
.map(get_module_graph_error_class)