summaryrefslogtreecommitdiff
path: root/src/isolate.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-02-28 16:19:04 -0500
committerGitHub <noreply@github.com>2019-02-28 16:19:04 -0500
commitb3b989ffdca61403cdd7ca94bd9256159864469e (patch)
treede53cd24d4ee4726fdd8f66c32ebd6016d3f6ad7 /src/isolate.rs
parentb0c7b54f692ecc866d4f70bfa384631523bbf924 (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/isolate.rs')
-rw-r--r--src/isolate.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/isolate.rs b/src/isolate.rs
index 440c168f2..3473f306b 100644
--- a/src/isolate.rs
+++ b/src/isolate.rs
@@ -12,12 +12,13 @@ use crate::errors::DenoError;
use crate::errors::DenoResult;
use crate::errors::RustOrJsError;
use crate::flags;
-use crate::js_errors::JSError;
+use crate::js_errors::apply_source_map;
use crate::libdeno;
use crate::modules::Modules;
use crate::msg;
use crate::permissions::DenoPermissions;
use crate::tokio_util;
+use deno_core::JSError;
use futures::sync::mpsc as async_mpsc;
use futures::Future;
use libc::c_char;
@@ -250,7 +251,7 @@ impl Isolate {
let v8_exception = cstr.to_str().unwrap();
debug!("v8_exception\n{}\n", v8_exception);
let js_error = JSError::from_v8_exception(v8_exception).unwrap();
- let js_error_mapped = js_error.apply_source_map(&self.state.dir);
+ let js_error_mapped = apply_source_map(&js_error, &self.state.dir);
Some(js_error_mapped)
}
}