Class ErrorAction

    • Constructor Detail

      • ErrorAction

        public ErrorAction​(@NonNull
                           Throwable error)
    • Method Detail

      • getError

        @NonNull
        public Throwable getError()
      • 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)