Class ChangingBuildStatusErrorHandler
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<StatusErrorHandler>
-
- org.jenkinsci.plugins.github.extension.status.StatusErrorHandler
-
- org.jenkinsci.plugins.github.status.err.ChangingBuildStatusErrorHandler
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<StatusErrorHandler>
,ErrorHandler
public class ChangingBuildStatusErrorHandler extends StatusErrorHandler
Can change build status in case of errors- Since:
- 1.19.0
- Author:
- lanwen (Merkushev Kirill)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChangingBuildStatusErrorHandler.ChangingBuildStatusErrorHandlerDescriptor
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ChangingBuildStatusErrorHandler(String result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getResult()
boolean
handle(Exception e, Run<?,?> run, TaskListener listener)
Logs error to build console and changes build result-
Methods inherited from class org.jenkinsci.plugins.github.extension.status.StatusErrorHandler
all
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
ChangingBuildStatusErrorHandler
@DataBoundConstructor public ChangingBuildStatusErrorHandler(String result)
-
-
Method Detail
-
getResult
public String getResult()
-
handle
public boolean handle(Exception e, @NonNull Run<?,?> run, @NonNull TaskListener listener)
Logs error to build console and changes build result- Parameters:
e
- exception to handle (log, ignore, process, rethrow)run
- run object from the steplistener
- listener object from the step- Returns:
- true as of it terminating handler
-
-