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

org.itsallcode.jdbc.UncheckedSQLException Maven / Gradle / Ivy

There is a newer version: 0.7.1
Show newest version
package org.itsallcode.jdbc;

import java.sql.SQLException;

/**
 * This unchecked exception is thrown whenever a checked {@link SQLException} is
 * thrown.
 */
public class UncheckedSQLException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    /**
     * Create a new instance.
     * 
     * @param cause the cause
     */
    public UncheckedSQLException(final SQLException cause) {
        super(cause);
    }

    /**
     * Create a new instance.
     * 
     * @param message error message
     * @param cause   cause
     */
    public UncheckedSQLException(final String message, final SQLException cause) {
        super(message + ": " + cause.getMessage(), cause);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy