GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — benchmark: throw on invalid type in fs and webstorage · nodejs/node@8fd96f4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • benchmark
    • fs
      • bench-accessSync.js
      • bench-chmodSync.js
      • bench-chownSync.js
      • bench-existsSync.js
      • bench-fchmodSync.js
      • bench-fsyncSync.js
      • bench-linkSync.js
      • bench-mkdirSync.js
      • bench-mkdtempSync.js
      • bench-openSync.js
      • bench-opendirSync.js
      • bench-readSync.js
      • bench-readlinkSync.js
      • bench-rmdirSync.js
      • bench-symlinkSync.js
      • bench-timesSync.js
      • bench-unlinkSync.js
      • bench_fdatasyncSync.js
    • webstorage
      • getItem.js
      • removeItem.js
      • setItem.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎benchmark/fs/bench-accessSync.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/bench-accessSync.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function main({ n, type, method }) {
4848
path = tmpdir.resolve(`.non-existing-file-${process.pid}`);
4949
break;
5050
default:
51-
new Error('Invalid type');
51+
throw new Error('Invalid type');
5252
}
5353

5454
if (method === 'access') {
Collapse file

‎benchmark/fs/bench-chmodSync.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/bench-chmodSync.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ function main({ n, type }) {
3636
bench.end(n);
3737
break;
3838
default:
39-
new Error('Invalid type');
39+
throw new Error('Invalid type');
4040
}
4141
}
Collapse file

‎benchmark/fs/bench-chownSync.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/bench-chownSync.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ function main({ n, type, method }) {
4949
break;
5050
}
5151
default:
52-
new Error('Invalid type');
52+
throw new Error('Invalid type');
5353
}
5454
}
Collapse file

‎benchmark/fs/bench-existsSync.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/bench-existsSync.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function main({ n, type }) {
2727
path = tmpdir.resolve(`.non-existing-file-${process.pid}`);
2828
break;
2929
default:
30-
new Error('Invalid type');
30+
throw new Error('Invalid type');
3131
}
3232

3333
bench.start();
Collapse file

‎benchmark/fs/bench-fchmodSync.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/bench-fchmodSync.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function main({ n, type }) {
2828
files = new Array(n).fill(tmpdir.resolve(`.non-existing-file-${Date.now()}`));
2929
break;
3030
default:
31-
new Error('Invalid type');
31+
throw new Error('Invalid type');
3232
}
3333

3434
const fds = files.map((x) => {
Collapse file

‎benchmark/fs/bench-fsyncSync.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/bench-fsyncSync.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function main({ n, type }) {
2424
fd = 1 << 30;
2525
break;
2626
default:
27-
new Error('Invalid type');
27+
throw new Error('Invalid type');
2828
}
2929

3030
bench.start();
Collapse file

‎benchmark/fs/bench-linkSync.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/bench-linkSync.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ function main({ n, type }) {
4545
break;
4646
}
4747
default:
48-
new Error('Invalid type');
48+
throw new Error('Invalid type');
4949
}
5050
}
Collapse file

‎benchmark/fs/bench-mkdirSync.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/bench-mkdirSync.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function main({ n, type, recursive }) {
2929
files = new Array(n).fill(__dirname);
3030
break;
3131
default:
32-
new Error('Invalid type');
32+
throw new Error('Invalid type');
3333
}
3434

3535
bench.start();
Collapse file

‎benchmark/fs/bench-mkdtempSync.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/bench-mkdtempSync.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function main({ n, type }) {
2727
prefix = tmpdir.resolve('non-existent', 'foo', 'bar');
2828
break;
2929
default:
30-
new Error('Invalid type');
30+
throw new Error('Invalid type');
3131
}
3232

3333
bench.start();
Collapse file

‎benchmark/fs/bench-openSync.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/bench-openSync.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function main({ n, type }) {
3333
path = tmpdir.resolve(`.non-existing-file-${process.pid}`);
3434
break;
3535
default:
36-
new Error('Invalid type');
36+
throw new Error('Invalid type');
3737
}
3838

3939
runBench({ n, path });

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.