diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-02-28 16:19:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-28 16:19:04 -0500 |
commit | b3b989ffdca61403cdd7ca94bd9256159864469e (patch) | |
tree | de53cd24d4ee4726fdd8f66c32ebd6016d3f6ad7 /src/workers.rs | |
parent | b0c7b54f692ecc866d4f70bfa384631523bbf924 (diff) |
Use deno_core::JSError in deno (#1855)
src/js_errors.rs takes care of source maps and color while
core/js_errors.rs is just the basic struct.
Diffstat (limited to 'src/workers.rs')
-rw-r--r-- | src/workers.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/workers.rs b/src/workers.rs index 5eb75ae13..3b20ae371 100644 --- a/src/workers.rs +++ b/src/workers.rs @@ -3,11 +3,12 @@ use crate::isolate::Buf; use crate::isolate::Isolate; use crate::isolate::IsolateState; use crate::isolate::WorkerChannels; -use crate::js_errors::JSError; +use crate::js_errors::JSErrorColor; use crate::ops; use crate::resources; use crate::snapshot; use crate::tokio_util; +use deno_core::JSError; use futures::sync::mpsc; use futures::sync::oneshot; @@ -75,7 +76,7 @@ pub fn spawn( worker.event_loop()?; Ok(()) })().or_else(|err: JSError| -> Result<(), JSError> { - eprintln!("{}", err.to_string()); + eprintln!("{}", JSErrorColor(&err).to_string()); std::process::exit(1) }).unwrap(); }); |