Skip to content

Commit

Permalink
[FIX] fsInterface: Improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
matz3 committed Oct 21, 2020
1 parent f56f2a8 commit 8b998f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fsInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = (reader) => {
nodir: false
}).then(function(resource) {
if (!resource) {
const error = new Error();
const error = new Error(`ENOENT: no such file or directory, open '${fsPath}'`);
error.code = "ENOENT"; // "File or directory does not exist"
callback(error);
return;
Expand All @@ -52,7 +52,7 @@ module.exports = (reader) => {
nodir: false
}).then(function(resource) {
if (!resource) {
const error = new Error();
const error = new Error(`ENOENT: no such file or directory, stat '${fsPath}'`);
error.code = "ENOENT"; // "File or directory does not exist"
callback(error);
} else {
Expand Down

0 comments on commit 8b998f8

Please sign in to comment.