From 9d0acfc1e94c0f03145cdaac150b4896846c8ae1 Mon Sep 17 00:00:00 2001 From: Greg Domjan Date: Fri, 23 Jul 2021 12:28:21 +1000 Subject: [PATCH] Add stack trace for generic exception in build threads --- src/main/java/com/github/maven_nar/cpptasks/CCTask.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/maven_nar/cpptasks/CCTask.java b/src/main/java/com/github/maven_nar/cpptasks/CCTask.java index aef21e6fd..d2881b776 100644 --- a/src/main/java/com/github/maven_nar/cpptasks/CCTask.java +++ b/src/main/java/com/github/maven_nar/cpptasks/CCTask.java @@ -994,7 +994,11 @@ private BuildException runTargetPool(final CCTaskProgressMonitor monitor, BuildE if (compileException == null && exception instanceof BuildException) { compileException = (BuildException) exception; } else { - log(cores[j].getName() + " " + exception + " ", Project.MSG_ERR); + log(cores[j].getName() + " " + exception + " ", Project.MSG_ERR); + final StackTraceElement[] stackTrace = exception.getStackTrace(); + for (final StackTraceElement element : stackTrace) { + log(element.toString(),Project.MSG_DEBUG); + } } if (!this.relentless) { cores[j] = null;