Skip to content

Commit e6cc7f2

Browse files
committed
Some more debug
1 parent c474219 commit e6cc7f2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/csscomb.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,18 @@ Comb.prototype = {
8585
*/
8686
processString: function(text, filename) {
8787
var tree;
88+
var string = JSON.stringify;
89+
if (typeof text === 'undefined') {
90+
throw new Error('Undefined file content ' + filename + ': ' + string(text));
91+
}
8892
try {
8993
tree = gonzales.srcToCSSP(text);
9094
} catch (e) {
9195
throw new Error('Parsing error at ' + filename + ': ' + e.message);
9296
}
97+
if (typeof tree === 'undefined') {
98+
throw new Error('Undefined tree at ' + filename + ': ' + string(text) + ' => ' + string(tree));
99+
}
93100
tree = this.processTree(tree);
94101
return gonzales.csspToSrc(tree);
95102
},

0 commit comments

Comments
 (0)