mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Split file-based input errors into missing vs invalid #1542
This commit is contained in:
@@ -32,7 +32,7 @@ const sharp = require('../build/Release/sharp.node');
|
||||
*/
|
||||
function toFile (fileOut, callback) {
|
||||
if (!fileOut || fileOut.length === 0) {
|
||||
const errOutputInvalid = new Error('Invalid output');
|
||||
const errOutputInvalid = new Error('Missing output file path');
|
||||
if (is.fn(callback)) {
|
||||
callback(errOutputInvalid);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user