Skip to content

Commit

Permalink
stress: catch-all and log unhandled errors (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-nascimento authored Jul 31, 2024
1 parent 44fce31 commit 58c551e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/stress/src/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const run = async () => {
process.exit(0)
}

run().catch(() => {
run().catch((e) => {
logger.error('unhandled error:', e)
process.exit(1)
})
5 changes: 4 additions & 1 deletion packages/stress/src/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@ const run = async () => {
}
exit(0)
}
run().catch(() => exit(1))
run().catch((e) => {
logger.error('unhandled error:', e)
exit(1)
})

0 comments on commit 58c551e

Please sign in to comment.