Skip to content

Commit

Permalink
Display the invalid glob in error message
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kevinwestern committed Jul 9, 2014
1 parent a83eb9a commit 726b3a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit 726b3a1

Please sign in to comment.