Skip to content

Commit

Permalink
beautify error message
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jan 21, 2020
1 parent 3df37d3 commit 23bbb76
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cli/prisma2/src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,13 @@ if (require.main === module) {
})
.catch(err => {
if (err.rustStack) {
handlePanic(err, packageJson.name, packageJson.version)
handlePanic(err, packageJson.name, packageJson.version).catch(e => {
if (debugLib.enabled('prisma')) {
console.error(chalk.redBright.bold('Error: ') + e.stack)
} else {
console.error(chalk.redBright.bold('Error: ') + e.message)
}
})
} else {
if (debugLib.enabled('prisma')) {
console.error(chalk.redBright.bold('Error: ') + err.stack)
Expand Down

0 comments on commit 23bbb76

Please sign in to comment.