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

com.ptsmods.mysqlw.SilentSQLException Maven / Gradle / Ivy

There is a newer version: 1.5.1
Show newest version
package com.ptsmods.mysqlw;

import java.sql.SQLException;

/**
 * An Exception class to wrap {@link SQLException}s to be thrown silently.
 */
public class SilentSQLException extends RuntimeException {

    private final SQLException parent;

    public SilentSQLException(SQLException parent) {
        super(parent.getMessage(), parent.getCause());
        this.parent = parent;
    }

    public SQLException getParent() {
        return parent;
    }

    public String getSQLState() {
        return parent.getSQLState();
    }

    public int getErrorCode() {
        return parent.getErrorCode();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy