This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch maven-3.8.x
in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/maven-3.8.x by this push:
new 8882a9c [MNG-7164] Add constructor MojoExecutionException(Throwable)
8882a9c is described below
commit 8882a9c599013182e42f0c7c321396c23b84dbe0
Author: Gary Gregory <[email protected]>
AuthorDate: Sat May 29 09:31:49 2021 -0400
[MNG-7164] Add constructor MojoExecutionException(Throwable)
This closes #474
---
.../apache/maven/plugin/AbstractMojoExecutionException.java | 12 ++++++++++++
.../org/apache/maven/plugin/MojoExecutionException.java | 13 +++++++++++++
.../java/org/apache/maven/plugin/MojoFailureException.java | 13 +++++++++++++
3 files changed, 38 insertions(+)
diff --git
a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojoExecutionException.java
b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojoExecutionException.java
index 52aded3..e8df309 100644
---
a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojoExecutionException.java
+++
b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojoExecutionException.java
@@ -41,6 +41,18 @@ public abstract class AbstractMojoExecutionException
super( message, cause );
}
+ /**
+ * Constructs a new {@code AbstractMojoExecutionException} exception
wrapping an underlying {@code Throwable}.
+ *
+ * @param cause the cause which is saved for later retrieval by the {@link
#getCause()} method.
+ * A {@code null} value is permitted, and indicates that the
cause is nonexistent or unknown.
+ * @since 3.8.3
+ */
+ public AbstractMojoExecutionException( Throwable cause )
+ {
+ super( cause );
+ }
+
public String getLongMessage()
{
return longMessage;
diff --git
a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionException.java
b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionException.java
index 4d8c416..6d08989 100644
---
a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionException.java
+++
b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionException.java
@@ -76,4 +76,17 @@ public class MojoExecutionException
{
super( message );
}
+
+ /**
+ * Constructs a new {@code MojoExecutionException} exception wrapping an
underlying {@code Throwable}.
+ *
+ * @param cause the cause which is saved for later retrieval by the {@link
#getCause()} method.
+ * A {@code null} value is permitted, and indicates that the
cause is nonexistent or unknown.
+ * @since 3.8.3
+ */
+ public MojoExecutionException( Throwable cause )
+ {
+ super( cause );
+ }
+
}
diff --git
a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoFailureException.java
b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoFailureException.java
index 342d081..72faec6 100644
---
a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoFailureException.java
+++
b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoFailureException.java
@@ -65,4 +65,17 @@ public class MojoFailureException
{
super( message, cause );
}
+
+ /**
+ * Constructs a new {@code MojoFailureException} exception wrapping an
underlying {@code Throwable}.
+ *
+ * @param cause the cause which is saved for later retrieval by the {@link
#getCause()} method.
+ * A {@code null} value is permitted, and indicates that the
cause is nonexistent or unknown.
+ * @since 3.8.3
+ */
+ public MojoFailureException( Throwable cause )
+ {
+ super( cause );
+ }
+
}