From c8b5f1e454d5cb2bd7580bbe0ac4fa83237e9f41 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Wed, 26 Aug 2020 18:20:22 +0200 Subject: Simplify ErrBox-to-class mapping & hook it up to core json ops (#7195) --- cli/worker.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/worker.rs') diff --git a/cli/worker.rs b/cli/worker.rs index cfdcaeda7..0129242e6 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -use crate::errors::rust_err_to_json; +use crate::errors::get_error_class; use crate::fmt_errors::JSError; use crate::global_state::GlobalState; use crate::inspector::DenoInspector; @@ -116,7 +116,7 @@ impl Worker { core_state.set_js_error_create_fn(move |core_js_error| { JSError::create(core_js_error, &global_state.ts_compiler) }); - core_state.set_rust_err_to_json_fn(&rust_err_to_json); + core_state.set_get_error_class_fn(&get_error_class); } let inspector = { -- cgit v1.2.3