Skip to content

Commit

Permalink
show stack trace when non-stylelint error occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
shinnn committed Feb 13, 2016
1 parent b6a817e commit ce1493e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ function validate(document) {
return;
}

connection.window.showErrorMessage('stylelint: ' + err.message);
// https://github.com/stylelint/stylelint/blob/4.2.0/src/utils/configurationError.js#L3
if (err.code === 78) {
connection.window.showErrorMessage('stylelint: ' + err.message);
return;
}

connection.window.showErrorMessage(err.stack.replace(/\n/g, ' '));
});
}

Expand Down

0 comments on commit ce1493e

Please sign in to comment.