Skip to content

Commit

Permalink
Add missing file name to 'Input file is missing' error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Brodan committed Apr 4, 2022
1 parent 5d36f5f commit 7c0a445
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -81,7 +81,8 @@
"Taneli Vatanen <taneli.vatanen@gmail.com>",
"Joris Dugué <zaruike10@gmail.com>",
"Chris Banks <christopher.bradley.banks@gmail.com>",
"Ompal Singh <ompal.hitm09@gmail.com>"
"Ompal Singh <ompal.hitm09@gmail.com>",
"Brodan <christopher.hranj@gmail.com"
],
"scripts": {
"install": "(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)",
Expand Down
2 changes: 1 addition & 1 deletion src/common.cc
Expand Up @@ -399,7 +399,7 @@ namespace sharp {
throw vips::VError("Input file is missing, did you mean "
"sharp(Buffer.from('" + descriptor->file.substr(0, 8) + "...')?");
}
throw vips::VError("Input file is missing");
throw vips::VError("Input file is missing: " + descriptor->file);
}
if (imageType != ImageType::UNKNOWN) {
try {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/io.js
Expand Up @@ -457,7 +457,7 @@ describe('Input/output', function () {
done();
}).catch(function (err) {
assert(err instanceof Error);
assert.strictEqual('Input file is missing', err.message);
assert.strictEqual('Input file is missing: does-not-exist', err.message);
done();
});
});
Expand Down

0 comments on commit 7c0a445

Please sign in to comment.