Skip to content

Commit

Permalink
Bugfix: Output stacktrace to support typescript errors.
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
stalet committed Jan 8, 2024
1 parent 1ebff45 commit ecba5cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ exports.handler = async function (argv) {
try {
await runMocha(mocha, argv);
} catch (err) {
console.error('\n' + (err.stack || `Error: ${err.message || err}`));
console.error('\n' + (err.stack || `Error: ${err && err.message}`), err);
process.exit(1);
}
};

0 comments on commit ecba5cd

Please sign in to comment.