summaryrefslogtreecommitdiff
path: root/ext/node
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node')
-rw-r--r--ext/node/polyfills/01_require.js2
-rw-r--r--ext/node/polyfills/02_init.js2
-rw-r--r--ext/node/polyfills/_process/process.ts2
-rw-r--r--ext/node/polyfills/internal/util/comparisons.ts2
-rw-r--r--ext/node/polyfills/os.ts2
5 files changed, 5 insertions, 5 deletions
diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js
index aec8c55b8..d666b3927 100644
--- a/ext/node/polyfills/01_require.js
+++ b/ext/node/polyfills/01_require.js
@@ -890,7 +890,7 @@ Module._preloadModules = function (requests) {
Module.prototype.load = function (filename) {
if (this.loaded) {
- throw Error("Module already loaded");
+ throw new Error("Module already loaded");
}
// Canonicalize the path so it's not pointing to the symlinked directory
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) {
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");
}
}
diff --git a/ext/node/polyfills/internal/util/comparisons.ts b/ext/node/polyfills/internal/util/comparisons.ts
index 65350a813..39e30c69a 100644
--- a/ext/node/polyfills/internal/util/comparisons.ts
+++ b/ext/node/polyfills/internal/util/comparisons.ts
@@ -432,7 +432,7 @@ function isEqualBoxedPrimitive(a: any, b: any): boolean {
}
// assert.fail(`Unknown boxed type ${val1}`);
// return false;
- throw Error(`Unknown boxed type`);
+ throw new Error(`Unknown boxed type`);
}
function getEnumerables(val: any, keys: any) {
diff --git a/ext/node/polyfills/os.ts b/ext/node/polyfills/os.ts
index 1cd466ec2..e47e8679e 100644
--- a/ext/node/polyfills/os.ts
+++ b/ext/node/polyfills/os.ts
@@ -311,7 +311,7 @@ export function type(): string {
case "openbsd":
return "OpenBSD";
default:
- throw Error("unreachable");
+ throw new Error("unreachable");
}
}