diff --git a/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/DefaultCompilerManager.java b/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/DefaultCompilerManager.java index 298ba294..4937ae21 100644 --- a/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/DefaultCompilerManager.java +++ b/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/DefaultCompilerManager.java @@ -69,7 +69,7 @@ public Compiler getCompiler(String compilerId) throws NoSuchCompilerException { } catch (Exception e) { // DI could not construct compiler log.error(ERROR_MESSAGE, compilerId); - throw new NoSuchCompilerException(compilerId); + throw new NoSuchCompilerException(compilerId, e); } } } diff --git a/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/NoSuchCompilerException.java b/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/NoSuchCompilerException.java index e40c6462..135f0950 100644 --- a/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/NoSuchCompilerException.java +++ b/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/NoSuchCompilerException.java @@ -31,8 +31,11 @@ public class NoSuchCompilerException extends Exception { private final String compilerId; public NoSuchCompilerException(String compilerId) { - super("No such compiler '" + compilerId + "'."); + this(compilerId, null); + } + public NoSuchCompilerException(String compilerId, Throwable cause) { + super("No such compiler '" + compilerId + "'", cause); this.compilerId = compilerId; }