Class ErrorAction
java.lang.Object
org.jenkinsci.plugins.workflow.actions.ErrorAction
- All Implemented Interfaces:
Action
,ModelObject
,PersistentAction
Attached to
FlowNode
that caused an error.
This has to be Action because it's added after a node is created.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Object.equals(java.lang.Object)
might not be reliable if the program has resumed and stuff is deserialized.static FlowNode
findOrigin
(Throwable error, FlowExecution execution) Attempts to locate the first node of a build which threw an error.getError()
-
Constructor Details
-
ErrorAction
-
-
Method Details
-
getError
-
getIconFileName
- Specified by:
getIconFileName
in interfaceAction
-
getDisplayName
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
- Specified by:
getUrlName
in interfaceAction
-
findOrigin
@CheckForNull public static FlowNode findOrigin(@NonNull Throwable error, @NonNull FlowExecution execution) Attempts to locate the first node of a build which threw an error. Typically an error will be rethrown by enclosing blocks, so this will look for the original node with anErrorAction
matching the given stack trace.- Parameters:
error
- an error thrown at some point during a buildexecution
- the build- Returns:
- the originating node, if one can be located;
typically an
AtomNode
orBlockEndNode
(in the latter case you may want to useBlockEndNode.getStartNode()
to look up actions)
-
equals
@Restricted(org.kohsuke.accmod.restrictions.Beta.class) public static boolean equals(Throwable t1, Throwable t2) Object.equals(java.lang.Object)
might not be reliable if the program has resumed and stuff is deserialized.
-