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/errors.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/errors.rs')
-rw-r--r-- | src/errors.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/errors.rs b/src/errors.rs index 3a6937495..65118d070 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,9 +1,8 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. - -use crate::js_errors::JSError; +use crate::js_errors::JSErrorColor; pub use crate::msg::ErrorKind; use crate::resolve_addr::ResolveAddrError; - +use deno_core::JSError; use hyper; use std; use std::fmt; @@ -202,7 +201,7 @@ impl fmt::Display for RustOrJsError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { RustOrJsError::Rust(e) => e.fmt(f), - RustOrJsError::Js(e) => e.fmt(f), + RustOrJsError::Js(e) => JSErrorColor(e).fmt(f), } } } |