Skip to content

Commit 5bb9b10

Browse files
committed
handle invalid configuration and exit with error
1 parent 61457f0 commit 5bb9b10

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ try {
88
if (e.code == 'MODULE_NOT_FOUND') {
99
console.error('Configuration file `browserstack.json` is missing.');
1010
} else {
11-
throw(e);
11+
console.error('Invalid configuration in `browserstack.json` file');
12+
console.error(e.message);
13+
console.error(e.stack);
14+
process.exit(1);
1215
}
13-
14-
process.exit(1);
1516
}
1617

1718
try {

0 commit comments

Comments
 (0)