public interface CatchExecutionOptions extends Serializable
Modifier and Type | Method and 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 with
WarningAction ) if an error is caught. |
boolean |
isCatchInterruptions()
Whether
FlowInterruptedException should be caught and handled by the step or rethrown. |
@CheckForNull String getMessage()
getStepResultOnError()
(by adding a WarningAction
)@NonNull Result getBuildResultOnError()
Result.SUCCESS
to leave the build result unchanged. If isCatchInterruptions()
returns true
, then if a FlowInterruptedException
is caught, its result will be used
instead of this value.@NonNull Result getStepResultOnError()
WarningAction
) if an error is caught.
Return Result.SUCCESS
to leave the step result unchanged. If isCatchInterruptions()
returns true
, then if a FlowInterruptedException
is caught, its result will be used
instead of this value.boolean isCatchInterruptions()
FlowInterruptedException
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 of TimeoutStep
. It is
sometimes desirable to rethrow these kinds of exceptions rather than catching them so as to
not interfere with their intended behavior.Copyright © 2016–2022. All rights reserved.