Package org.jenkinsci.plugins.workflow.actions

Examples of org.jenkinsci.plugins.workflow.actions.ErrorAction


                        Throwable error = o.getAbnormal();
                        if (error instanceof FlowInterruptedException) {
                            result = ((FlowInterruptedException) error).getResult();
                        }
                        execution.setResult(result);
                        t.head.get().addAction(new ErrorAction(error));
                    }

                    if (!t.isAlive()) {
                        LOGGER.fine("completed " + t);
View Full Code Here


            super(callback, startNode);
        }

        @Override
        public Next receive(Object o) {
            addBodyEndFlowNode().addAction(new ErrorAction((Throwable)o));
            callback.onFailure((Throwable)o);
            return Next.terminate(null);
        }
View Full Code Here

        List<FlowNode> heads = getCurrentHeads();
        if (heads.size()!=1 || !(heads.get(0) instanceof FlowEndNode))
            return null;

        FlowNode e = heads.get(0);
        ErrorAction error = e.getAction(ErrorAction.class);
        if (error==null)    return null;        // successful completion

        return error.getError();
    }
View Full Code Here

     * If the given outcome is a failure, mark the current head as a failure.
     */
    public void markIfFail(Outcome o) {
        // record the failure in a step
        if (o.isFailure()) {
            get().addAction(new ErrorAction(o.getAbnormal()));
        }
    }
View Full Code Here

        // run till the end successfully FIXME: failure comes here, too
        // TODO: if program terminates with exception, we need to record it
        // TODO: in the error case, we have to close all the open nodes
        FlowNode head = new FlowEndNode(this, iotaStr(), (FlowStartNode)startNodes.pop(), result, getCurrentHeads().toArray(new FlowNode[0]));
        if (outcome.isFailure())
            head.addAction(new ErrorAction(outcome.getAbnormal()));

        // shrink everything into a single new head
        done = true;
        FlowHead first = getFirstHead();
        first.setNewHead(head);
View Full Code Here

TOP

Related Classes of org.jenkinsci.plugins.workflow.actions.ErrorAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.