From 9deac83322e242141c1299f6a74deac60276e1ec Mon Sep 17 00:00:00 2001 From: Chris Hranj Date: Tue, 5 Apr 2022 06:35:01 -0400 Subject: [PATCH] Add missing file name to 'Input file is missing' error message (#3178) --- package.json | 3 ++- src/common.cc | 2 +- test/unit/io.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ec24a374..cdc16a7c 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,8 @@ "Taneli Vatanen ", "Joris Dugué ", "Chris Banks ", - "Ompal Singh " + "Ompal Singh ", + "Brodan 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 { diff --git a/test/unit/io.js b/test/unit/io.js index c264644d..dc6004aa 100644 --- a/test/unit/io.js +++ b/test/unit/io.js @@ -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(); }); });