From 6ccaebcdeae95a82b270ac5bde78b65b37fadb45 Mon Sep 17 00:00:00 2001 From: Ian Bull Date: Wed, 28 Aug 2024 16:40:37 -0400 Subject: refactor(ext): throw new error instead of throw error (#25272) To ensure consistency across the codebase, this commit refactors the code in the `ext` folder to use `throw new Error`` instead of `throw` for throwing errors. Fixes https://github.com/denoland/deno/issues/25270 --- ext/node/polyfills/_process/process.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/node/polyfills/_process/process.ts') diff --git a/ext/node/polyfills/_process/process.ts b/ext/node/polyfills/_process/process.ts index 5abde1cf0..e4b88a11a 100644 --- a/ext/node/polyfills/_process/process.ts +++ b/ext/node/polyfills/_process/process.ts @@ -32,7 +32,7 @@ export function arch(): string { } else if (build.arch == "riscv64gc") { return "riscv64"; } else { - throw Error("unreachable"); + throw new Error("unreachable"); } } -- cgit v1.2.3