summaryrefslogtreecommitdiff
path: root/cli/op_error.rs
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2020-03-02 14:20:16 -0800
committerBert Belder <bertbelder@gmail.com>2020-03-02 14:20:16 -0800
commiteafd40feabaf14f9f88748c66fa319519fd69072 (patch)
treeccb3a5848fec4bc013aad774fc9c9bda2f894043 /cli/op_error.rs
parent3fcbf8789e7f873f8a562b200ab82ea7cec173d8 (diff)
Do not convert exceptions to JSON and back (#4214)
Diffstat (limited to 'cli/op_error.rs')
-rw-r--r--cli/op_error.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/cli/op_error.rs b/cli/op_error.rs
index 6a7dab20c..d81d4cad1 100644
--- a/cli/op_error.rs
+++ b/cli/op_error.rs
@@ -3,19 +3,16 @@
//! There are many types of errors in Deno:
//! - ErrBox: a generic boxed object. This is the super type of all
//! errors handled in Rust.
-//! - JSError: exceptions thrown from V8 into Rust. Usually a user exception.
-//! These are basically a big JSON structure which holds information about
-//! line numbers. We use this to pretty-print stack traces. These are
-//! never passed back into the runtime.
+//! - JSError: a container for the error message and stack trace for exceptions
+//! thrown in JavaScript code. We use this to pretty-print stack traces.
//! - OpError: these are errors that happen during ops, which are passed
//! back into the runtime, where an exception object is created and thrown.
-//! OpErrors have an integer code associated with them - access this via the `kind` field.
+//! OpErrors have an integer code associated with them - access this via the
+//! `kind` field.
//! - Diagnostic: these are errors that originate in TypeScript's compiler.
//! They're similar to JSError, in that they have line numbers.
-//! But Diagnostics are compile-time type errors, whereas JSErrors are runtime exceptions.
-//!
-//! TODO:
-//! - rename/merge JSError with V8Exception?
+//! But Diagnostics are compile-time type errors, whereas JSErrors are runtime
+//! exceptions.
use crate::import_map::ImportMapError;
use deno_core::ErrBox;