自定义异常

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);
    }
}
上一篇:访问MySql出现Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:错误


下一篇:Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/dy/d