summaryrefslogtreecommitdiff
path: root/lib/fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fs.js')
-rw-r--r--lib/fs.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fs.js b/lib/fs.js
index 46dd447d3e..cfe856eaeb 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -117,6 +117,7 @@ function showTruncateDeprecation() {
function handleErrorFromBinding(ctx) {
if (ctx.errno !== undefined) { // libuv error numbers
const err = uvException(ctx);
+ // eslint-disable-next-line no-restricted-syntax
Error.captureStackTrace(err, handleErrorFromBinding);
throw err;
}
@@ -124,6 +125,7 @@ function handleErrorFromBinding(ctx) {
// TODO(joyeecheung): currently, ctx.error are encoding errors
// usually caused by memory problems. We need to figure out proper error
// code(s) for this.
+ // eslint-disable-next-line no-restricted-syntax
Error.captureStackTrace(ctx.error, handleErrorFromBinding);
throw ctx.error;
}