001package org.itsallcode.jdbc;
002
003import java.sql.SQLException;
004
005/**
006 * This unchecked exception is thrown whenever a checked {@link SQLException} is
007 * thrown.
008 */
009public class UncheckedSQLException extends RuntimeException {
010    private static final long serialVersionUID = 1L;
011
012    /**
013     * Create a new instance.
014     * 
015     * @param cause the cause
016     */
017    public UncheckedSQLException(final SQLException cause) {
018        super(cause);
019    }
020
021    /**
022     * Create a new instance.
023     * 
024     * @param message error message
025     * @param cause   cause
026     */
027    public UncheckedSQLException(final String message, final SQLException cause) {
028        super(message + ": " + cause.getMessage(), cause);
029    }
030}