Skip to content

Commit 8882a9c

Browse files
Gary Gregorymichael-o
Gary Gregory
authored andcommitted
[MNG-7164] Add constructor MojoExecutionException(Throwable)
This closes #474
1 parent ab54d17 commit 8882a9c

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojoExecutionException.java

+12
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ public AbstractMojoExecutionException( String message, Throwable cause )
4141
super( message, cause );
4242
}
4343

44+
/**
45+
* Constructs a new {@code AbstractMojoExecutionException} exception wrapping an underlying {@code Throwable}.
46+
*
47+
* @param cause the cause which is saved for later retrieval by the {@link #getCause()} method.
48+
* A {@code null} value is permitted, and indicates that the cause is nonexistent or unknown.
49+
* @since 3.8.3
50+
*/
51+
public AbstractMojoExecutionException( Throwable cause )
52+
{
53+
super( cause );
54+
}
55+
4456
public String getLongMessage()
4557
{
4658
return longMessage;

maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionException.java

+13
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,17 @@ public MojoExecutionException( String message )
7676
{
7777
super( message );
7878
}
79+
80+
/**
81+
* Constructs a new {@code MojoExecutionException} exception wrapping an underlying {@code Throwable}.
82+
*
83+
* @param cause the cause which is saved for later retrieval by the {@link #getCause()} method.
84+
* A {@code null} value is permitted, and indicates that the cause is nonexistent or unknown.
85+
* @since 3.8.3
86+
*/
87+
public MojoExecutionException( Throwable cause )
88+
{
89+
super( cause );
90+
}
91+
7992
}

maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoFailureException.java

+13
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,17 @@ public MojoFailureException( String message, Throwable cause )
6565
{
6666
super( message, cause );
6767
}
68+
69+
/**
70+
* Constructs a new {@code MojoFailureException} exception wrapping an underlying {@code Throwable}.
71+
*
72+
* @param cause the cause which is saved for later retrieval by the {@link #getCause()} method.
73+
* A {@code null} value is permitted, and indicates that the cause is nonexistent or unknown.
74+
* @since 3.8.3
75+
*/
76+
public MojoFailureException( Throwable cause )
77+
{
78+
super( cause );
79+
}
80+
6881
}

0 commit comments

Comments
 (0)