summaryrefslogtreecommitdiff
path: root/runtime/ops
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2024-10-14 13:53:17 -0700
committerGitHub <noreply@github.com>2024-10-14 13:53:17 -0700
commitcb385d9e4acbd81235c3784d7e56b49c3fa41dd3 (patch)
tree469e295220fd214e65778d9f20c8c06b0a1e2143 /runtime/ops
parentc5449d71da2d623e866d733b6db180a6f94ff7c6 (diff)
refactor(ext/webstorage): use concrete error types (#26173)
Diffstat (limited to 'runtime/ops')
-rw-r--r--runtime/ops/worker_host.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs
index b9fd06654..61e5ef3e0 100644
--- a/runtime/ops/worker_host.rs
+++ b/runtime/ops/worker_host.rs
@@ -10,6 +10,7 @@ use crate::web_worker::WorkerControlEvent;
use crate::web_worker::WorkerId;
use crate::web_worker::WorkerMetadata;
use crate::worker::FormatJsErrorFn;
+use deno_core::error::custom_error;
use deno_core::error::AnyError;
use deno_core::op2;
use deno_core::serde::Deserialize;
@@ -136,12 +137,10 @@ fn op_create_worker(
let worker_type = args.worker_type;
if let WebWorkerType::Classic = worker_type {
if let TestingFeaturesEnabled(false) = state.borrow() {
- return Err(
- deno_webstorage::DomExceptionNotSupportedError::new(
- "Classic workers are not supported.",
- )
- .into(),
- );
+ return Err(custom_error(
+ "DOMExceptionNotSupportedError",
+ "Classic workers are not supported.",
+ ));
}
}