Skip to content

Commit ecba5cd

Browse files
committed
Bugfix: Output stacktrace to support typescript errors.
Before this patch the errorhandling would fail with the error: "ERROR: null". Debug showed that the error "caught error sometime before command handler: TypeError: Cannot convert object to primitive value"
1 parent 1ebff45 commit ecba5cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cli/run.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ exports.handler = async function (argv) {
369369
try {
370370
await runMocha(mocha, argv);
371371
} catch (err) {
372-
console.error('\n' + (err.stack || `Error: ${err.message || err}`));
372+
console.error('\n' + (err.stack || `Error: ${err && err.message}`), err);
373373
process.exit(1);
374374
}
375375
};

0 commit comments

Comments
 (0)