Class ErrorAction

java.lang.Object
org.jenkinsci.plugins.workflow.actions.ErrorAction
All Implemented Interfaces:
Action, ModelObject, PersistentAction

public class ErrorAction extends Object implements PersistentAction
Attached to FlowNode that caused an error. This has to be Action because it's added after a node is created.
  • Constructor Details

    • ErrorAction

      public ErrorAction(@NonNull Throwable error)
  • Method Details

    • getError

      @NonNull public Throwable getError()
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • 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 an ErrorAction matching the given stack trace.
      Parameters:
      error - an error thrown at some point during a build
      execution - the build
      Returns:
      the originating node, if one can be located; typically an AtomNode or BlockEndNode (in the latter case you may want to use BlockEndNode.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.