All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cloudbees.groovy.cps.CatchExpression Maven / Gradle / Ivy

There is a newer version: 1.31
Show newest version
package com.cloudbees.groovy.cps;

import java.io.Serializable;
import java.util.List;

/**
 * Catch block in a try/catch statement.
 *
 * @author Kohsuke Kawaguchi
 * @see Builder#tryCatch(Block, List)
 */
public class CatchExpression implements Serializable {
    /**
     * Type of the exception to catch.
     */
    public final Class type;

    /**
     * Name of the variable that receives the exception.
     */
    public final String name;

    /**
     * Code that executes up on receiving an exception.
     */
    public final Block handler;

    public CatchExpression(Class type, String name, Block handler) {
        this.name = name;
        this.handler = handler;
        this.type = type;
    }

    private static final long serialVersionUID = 1L;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy