Skip to content

Commit f3b2175

Browse files
committed
include stack in error message thrown on config load failure - fixes #79
1 parent 54c21a6 commit f3b2175

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ module.exports = function (options) {
3232

3333
try {
3434
checker.configure(loadConfigFile.load(configPath));
35-
} catch (error) {
36-
throw new Error('Unable to load JSCS config file at ' + tildify(path.resolve(configPath)));
35+
} catch (err) {
36+
err.message = 'Unable to load JSCS config file at ' + tildify(path.resolve(configPath)) + '\n' + err.message;
37+
throw err;
3738
}
3839
} else {
3940
checker.configure(options);

0 commit comments

Comments
 (0)