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 52aded3d654..e8df3095f21 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 AbstractMojoExecutionException( String message, Throwable cause ) 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 4d8c416e077..6d089898600 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 MojoExecutionException( String message ) { 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 342d081f00b..72faec679eb 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 MojoFailureException( String message, Throwable cause ) { 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 ); + } + }