From 708ae3018e0c0b24c2402544c3aa769c99d83d88 Mon Sep 17 00:00:00 2001 From: Pim Date: Fri, 17 Jan 2020 10:18:12 +0100 Subject: [PATCH] fix(generator): log message or full error for unhandled error without stack trace (#6882) --- packages/generator/src/generator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/generator/src/generator.js b/packages/generator/src/generator.js index 4b895cee80..c13addf27b 100644 --- a/packages/generator/src/generator.js +++ b/packages/generator/src/generator.js @@ -128,7 +128,7 @@ export default class Generator { if (isHandled) { line += Chalk.grey(JSON.stringify(error, undefined, 2) + '\n') } else { - line += Chalk.grey(error.stack) + line += Chalk.grey(error.stack || error.message || `${error}`) } return line