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; diff --git a/src/main/java/com/github/maven_nar/cpptasks/compiler/CommandLineCompiler.java b/src/main/java/com/github/maven_nar/cpptasks/compiler/CommandLineCompiler.java index 0b17175ba..c1f4f506d 100644 --- a/src/main/java/com/github/maven_nar/cpptasks/compiler/CommandLineCompiler.java +++ b/src/main/java/com/github/maven_nar/cpptasks/compiler/CommandLineCompiler.java @@ -571,7 +571,8 @@ protected int getTotalArgumentLengthForInputFile(final File outputDir, final Str * arguments without actually spawning the compiler */ protected int runCommand(final CCTask task, final File workingDir, final String[] cmdline) throws BuildException { - commands.add(cmdline); + if(commands!=null) + commands.add(cmdline); if (dryRun) return 0; return CUtil.runCommand(task, workingDir, cmdline, this.newEnvironment, this.env); }