Interface CatchExecutionOptions
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CatchErrorStep
,WarnErrorStep
public interface CatchExecutionOptions extends Serializable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Result
getBuildResultOnError()
The result that will be used for setting the build result if an error is caught.String
getMessage()
A message to be printed when an error is caught.Result
getStepResultOnError()
The result that will be used for annotating the withWarningAction
) if an error is caught.boolean
isCatchInterruptions()
WhetherFlowInterruptedException
should be caught and handled by the step or rethrown.
-
-
-
Method Detail
-
getMessage
@CheckForNull String getMessage()
A message to be printed when an error is caught. IfgetStepResultOnError()
(by adding aWarningAction
)
-
getBuildResultOnError
@NonNull Result getBuildResultOnError()
The result that will be used for setting the build result if an error is caught. ReturnResult.SUCCESS
to leave the build result unchanged. IfisCatchInterruptions()
returnstrue
, then if aFlowInterruptedException
is caught, its result will be used instead of this value.
-
getStepResultOnError
@NonNull Result getStepResultOnError()
The result that will be used for annotating the withWarningAction
) if an error is caught. ReturnResult.SUCCESS
to leave the step result unchanged. IfisCatchInterruptions()
returnstrue
, then if aFlowInterruptedException
is caught, its result will be used instead of this value.
-
isCatchInterruptions
boolean isCatchInterruptions()
WhetherFlowInterruptedException
should be caught and handled by the step or rethrown.FlowInterruptedException
is commonly used to control the flow of execution for things like builds aborted by a user and builds that time out inside ofTimeoutStep
. It is sometimes desirable to rethrow these kinds of exceptions rather than catching them so as to not interfere with their intended behavior.
-
-