diff options
author | Ian Bull <irbull@eclipsesource.com> | 2024-08-28 16:40:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-28 22:40:37 +0200 |
commit | 6ccaebcdeae95a82b270ac5bde78b65b37fadb45 (patch) | |
tree | 4c50dc3aa74ef6bef2aca4706af8b16213b1e1f2 /ext/node/polyfills/02_init.js | |
parent | 231bdc0aa0c08914735001f5e1261e1808d68190 (diff) |
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
Diffstat (limited to 'ext/node/polyfills/02_init.js')
-rw-r--r-- | ext/node/polyfills/02_init.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/02_init.js b/ext/node/polyfills/02_init.js index 870ff12f3..8a4aa8e97 100644 --- a/ext/node/polyfills/02_init.js +++ b/ext/node/polyfills/02_init.js @@ -22,7 +22,7 @@ function initialize(args) { } = args; if (!warmup) { if (initialized) { - throw Error("Node runtime already initialized"); + throw new Error("Node runtime already initialized"); } initialized = true; if (usesLocalNodeModulesDir) { |