Skip to content

Commit

Permalink
Merge pull request #67 from farvilain/master
Browse files Browse the repository at this point in the history
Catching parse exception in mu.compile
  • Loading branch information
raycmorgan committed Jun 3, 2016
2 parents 78b0c28 + 38e820f commit 4095d34
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/mu.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ mu.compile = function(filename, callback, unique) {
return callback(err);
}

parsed = parser.parse(contents);
mu.cache[filename] = [parsed, unique];
try{
parsed = parser.parse(contents);
}catch(e){
return callback(e);
}

mu.cache[filename] = [parsed, unique];
var i = 0;
(function next(err) {
if (err) {
Expand Down

0 comments on commit 4095d34

Please sign in to comment.