其他分享
首页 > 其他分享> > 自定义异常

自定义异常

作者:互联网

1.自定义异常

public class CreateFailedException extends RuntimeException{

    public CreateFailedException(String errMsg) {
        super(errMsg);
    }

    /**
     * Construct a new runtime exception with the cause
     *
     * @param cause cause
     */
    public CreateFailedException(Throwable cause) {
        super(cause);
    }

    /**
     * Construct a new runtime exception with the detail message and cause
     *
     * @param errMsg message
     * @param cause cause
     */
    public CreateFailedException(String errMsg, Throwable cause) {
        super(errMsg, cause);
    }
}

标签:super,自定义,异常,param,CreateFailedException,cause,public,errMsg
来源: https://www.cnblogs.com/PythonOrg/p/14836445.html