class SQLException extends Exception implements Iterable<Throwable> {

    public void setNextException(SQLException exception) {
        SQLException curr = this;
        while (true) {
            SQLException next = curr.next;
            if (next == null) {
                curr.next = exception;
                return;
            }
            curr = next;
        }
    }

    public  SQLException(String message, @Nullable String sqlState, int errorCode);
    public  SQLException(String message, @Nullable String sqlState);
    public  SQLException(String message);
    public  SQLException();
    public  SQLException(@Nullable Throwable cause);
    public  SQLException(String message, @Nullable Throwable cause);
    public  SQLException(String message, @Nullable String sqlState, @Nullable Throwable cause);
    public  SQLException(String message, @Nullable String sqlState, int errorCode,
            @Nullable Throwable cause);

}