Skip to content

Commit f52f714

Browse files
committed
chore: document catch and rethrow
1 parent d7e9f74 commit f52f714

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ function load() {
55
try {
66
return require('../build/Release/mongocrypt.node');
77
} catch {
8+
// Webpack will fail when just returning the require, so we need to wrap
9+
// in a try/catch and rethrow.
10+
/* eslint no-useless-catch: 0 */
811
try {
912
return require('../build/Debug/mongocrypt.node');
1013
} catch (error) {

0 commit comments

Comments
 (0)