fix(generator): log message or full error for unhandled error without stack trace (#6882)

This commit is contained in:
Pim 2020-01-17 10:18:12 +01:00 committed by Pooya Parsa
parent e91a441f2c
commit 708ae3018e

View File

@ -128,7 +128,7 @@ export default class Generator {
if (isHandled) { if (isHandled) {
line += Chalk.grey(JSON.stringify(error, undefined, 2) + '\n') line += Chalk.grey(JSON.stringify(error, undefined, 2) + '\n')
} else { } else {
line += Chalk.grey(error.stack) line += Chalk.grey(error.stack || error.message || `${error}`)
} }
return line return line