From 726b3a1ac771c90a8186828e3eb37ad9f4832df8 Mon Sep 17 00:00:00 2001 From: Kevin Western Date: Tue, 8 Jul 2014 21:52:51 -0700 Subject: [PATCH] Display the invalid glob in error message The current error message for displaying a glob can be improved by including the invalid glob in the error message. This makes it easy for developers to debug exactly which glob is incorrect. --- lib/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/index.js b/lib/src/index.js index 4d5f046d..545da407 100644 --- a/lib/src/index.js +++ b/lib/src/index.js @@ -14,7 +14,7 @@ function createFile (globFile, enc, cb) { function src(glob, opt) { if (!isValidGlob(glob)) { - throw new Error('Invalid glob argument'); + throw new Error('Invalid glob argument: ' + glob); } var options = defaults({}, opt, {