Skip to content

Commit b75c61d

Browse files
committed
Add error message
1 parent 8ab55c0 commit b75c61d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/utils/lz4.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ function tryLoadLZ4Module(): LZ4Module | undefined {
77
return require('lz4'); // eslint-disable-line global-require
88
} catch (err) {
99
if (!(err instanceof Error) || !('code' in err)) {
10-
console.warn('Unexpected error loading LZ4 module: Invalid error object');
10+
console.warn('Unexpected error loading LZ4 module: Invalid error object', err);
1111
return undefined;
1212
}
1313

1414
if (err.code === 'MODULE_NOT_FOUND') {
15-
console.warn('LZ4 module not installed: Missing dependency');
15+
console.warn('LZ4 module not installed: Missing dependency', err);
1616
return undefined;
1717
}
1818

1919
if (err.code === 'ERR_DLOPEN_FAILED') {
20-
console.warn('LZ4 native module failed to load: Architecture or version mismatch');
20+
console.warn('LZ4 native module failed to load: Architecture or version mismatch', err);
2121
return undefined;
2222
}
2323

2424
// If it's not a known error, return undefined
25-
console.warn('Unknown error loading LZ4 module: Unhandled error code');
25+
console.warn('Unknown error loading LZ4 module: Unhandled error code', err);
2626
return undefined;
2727
}
2828
}

0 commit comments

Comments
 (0)