Examples of ErrorAction


Examples of net.csdn.annotation.rest.ErrorAction

                        NoAction noAction = method.getAnnotation(NoAction.class);
                        if (noAction != null) {
                            restController.setDefaultHandlerKey(new Tuple<Class<ApplicationController>, Method>(clzz, method));
                        }

                        ErrorAction errorAction = method.getAnnotation(ErrorAction.class);
                        if (errorAction != null) {
                            restController.setErrorHandlerKey(new Tuple<Class<ApplicationController>, Method>(clzz, method));
                        }

                        At at = method.getAnnotation(At.class);
View Full Code Here

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

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

            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

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

        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

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

     * 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

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

        // 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
Copyright © 2018 www.massapi.com. 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.