Skip to content

Commit 323845c

Browse files
committed
[FIX] Print error cause stack trace
The CLI now also prints the stack trace of the error cause of unexpected errors or when verbose logging is enabled. This improves error analysis in case an error is caught and re-thrown as "cause" of a new error, e.g. during minification.
1 parent 80a6931 commit 323845c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/cli/base.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ export default function(cli) {
108108
process.stderr.write("\n");
109109
process.stderr.write(err.stack);
110110
process.stderr.write("\n");
111+
if (err.cause instanceof Error && err.cause.stack) {
112+
process.stderr.write(chalk.underline("Error Cause Stack Trace:\n"));
113+
process.stderr.write(err.cause.stack + "\n");
114+
process.stderr.write("\n");
115+
}
111116
process.stderr.write(
112117
chalk.dim(
113118
`If you think this is an issue of the UI5 Tooling, you might report it using the ` +

0 commit comments

Comments
 (0)