Class BuildException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.jdrupes.builder.api.BuildException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ConfigurationException, UnavailableException
Represents an exception that occurs during the build. Terminates the
current build when thrown.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionInitializes a new build exception with its reason set toBuildException.Reason.Error.protectedBuildException(BuildException.Reason reason) Initializes a new build exception with the given reason. -
Method Summary
Modifier and TypeMethodDescriptionSets the cause.Add information to the details.details()Return the collected details.from(ResourceProvider resourceProvider) From.Sets the message of the build exception.origin()Returns the origin of this exception.reason()Returns the reason why the build failed.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BuildException
public BuildException()Initializes a new build exception with its reason set toBuildException.Reason.Error. -
BuildException
Initializes a new build exception with the given reason.- Parameters:
reason- the reason
-
-
Method Details
-
reason
-
message
Sets the message of the build exception. As a convenience, any Throwable arguments will be replaced by their message.- Parameters:
format- the formatargs- the args- Returns:
- the build exception
-
getMessage
- Overrides:
getMessagein classThrowable
-
cause
Sets the cause.- Parameters:
cause- the cause- Returns:
- the builds the exception
-
from
From.- Parameters:
resourceProvider- the resource provider- Returns:
- the builds the exception
-
detail
Add information to the details.- Parameters:
detail- the detail- Returns:
- the exception
-
origin
Returns the origin of this exception. This is the resource provider set withfrom(ResourceProvider).- Returns:
- the resource provider
-
details
-