diff --git a/wiredep.js b/wiredep.js index c5f1e3e..8b6a8dc 100644 --- a/wiredep.js +++ b/wiredep.js @@ -128,14 +128,14 @@ wiredep.stream = function (opts) { try { opts.stream = { - src: file.contents.toString(), + src: file.contents.toString() || " ", //< must be anything but an empty string or null path: file.path, fileType: $.path.extname(file.path).substr(1) }; file.contents = new Buffer(wiredep(opts)); } catch (err) { - this.emit('error', err); + this.emit('error', 'Error processing file ' + file.path + ': ' + err); } this.push(file);