@Named @Singleton public class PluginErrors extends Object
| Constructor and Description |
|---|
PluginErrors() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Throwable throwable)
Adds another
Throwable to the list. |
void |
buildError(String message,
Object... args)
Announces a MOJO build error by throwing an instance of
MojoExecutionException. |
boolean |
hasErrors() |
public boolean hasErrors()
true if any Throwable was added using
add(Throwable) before.public void add(Throwable throwable)
Throwable to the list.throwable - The Throwable to add.public void buildError(String message, Object... args) throws org.apache.maven.plugin.MojoExecutionException
MojoExecutionException. The thrown exception will contain all
previously added Throwable.message - The build error message.args - The optional list of arguments for that message (used with
String.format(String, Object...)).org.apache.maven.plugin.MojoExecutionException - The new instance of a MojoExecutionException which
contains all previously added exceptions.Copyright © 2016–2017. All rights reserved.