Package com.cloudbees.groovy.cps.impl

Examples of com.cloudbees.groovy.cps.impl.ThrowBlock


    /**
     * throw exp;
     */
    public Block throw_(final Block exp) {
        return new ThrowBlock(exp);
    }
View Full Code Here


    }

    public Next resumeFrom(Env e, Continuation k) {
        if (abnormal!=null) {
            // resume program by throwing this exception
            return new Next(new ThrowBlock(new ConstantBlock(abnormal)),e,null/*unused*/);
        } else {
            // resume program by passing the value
            return k.receive(normal);
        }
    }
View Full Code Here

        promise.set(g);
        runInCpsVmThread(new FutureCallback<CpsThreadGroup>() {
            @Override public void onSuccess(CpsThreadGroup g) {
                CpsThread t = g.addThread(
                        new Continuable(new ThrowBlock(new ConstantBlock(
                            new IOException("Failed to load persisted workflow state", problem)))),
                        head_, null
                );
                t.resume(new Outcome(null,null));
            }
View Full Code Here

    /**
     * throw exp;
     */
    public Block throw_(final Block exp) {
        return new ThrowBlock(exp);
    }
View Full Code Here

    /**
     * throw exp;
     */
    public Block throw_(final Block exp) {
        return new ThrowBlock(exp);
    }
View Full Code Here

        } catch (CpsCallableInvocation inv) {
            // this will create a thread, and resume with the newly created thread
            b = inv.asBlock();
        } catch (Throwable t) {
            // closure had run synchronously and failed
            b = new ThrowBlock(new ConstantBlock(t));
        }

        final Block bb = b;
        invoke(new ThreadTask() {
            public Result eval(GreenWorld w) {
View Full Code Here

TOP

Related Classes of com.cloudbees.groovy.cps.impl.ThrowBlock

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.