Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/org/codehaus/gmavenplus/util/ClassWrangler.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public Version getGroovyVersion() {
try {
return Version.parseFromString(getGroovyVersionString());
} catch (Exception e) {
throw new RuntimeException("Unable to determine Groovy version. Is Groovy declared as a dependency?");
throw new GroovyVersionException("Unable to determine Groovy version. Is Groovy declared as a dependency?", e);
}
}

Expand Down Expand Up @@ -259,7 +259,7 @@ protected String getGroovyJar() {

return groovyJar;
} catch (ClassNotFoundException e) {
throw new RuntimeException("Unable to determine Groovy version. Is Groovy declared as a dependency?");
throw new GroovyVersionException("Unable to determine Groovy version. Is Groovy declared as a dependency?", e);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.codehaus.gmavenplus.util;

/**
* Exception thrown when Groovy version cannot be determined.
*
* @author Keegan Witt
* @since 4.3.2
*/
public class GroovyVersionException extends RuntimeException {

/**
* Constructs a new GroovyVersionException with the specified message.
*
* @param message the detail message
*/
public GroovyVersionException(final String message) {
super(message);
}

/**
* Constructs a new GroovyVersionException with the specified message and cause.
*
* @param message the detail message
* @param cause the cause
*/
public GroovyVersionException(final String message, final Throwable cause) {
super(message, cause);
}

}
Loading