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

org.apache.drill.jdbc.JdbcApiSqlException Maven / Gradle / Ivy

There is a newer version: 1.21.2
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.drill.jdbc;

import java.sql.ResultSet;
import java.sql.SQLDataException;
import java.sql.SQLException;
import java.sql.SQLNonTransientException;
import java.sql.SQLSyntaxErrorException;  // (for Javadoc reference(s))
import java.sql.SQLTransientException;  // (for Javadoc reference(s))
import java.sql.ResultSet;  // (for Javadoc reference(s))


/**
 * SQLException for JDBC API calling-sequence/state problems.
 *
 * 

* {@code JdbcApiSqlException} is intended for errors in using the JDBC API, * such as calling {@link ResultSet#getString} before calling * {@link ResultSet#next}. *

*

* ({@code JdbcApiSqlException} is not for errors that are not under direct * control of the programmer writing JDBC API calls, for example, invalid SQL * syntax errors (which should use {@link SQLSyntaxErrorException}), errors * from SQL-vs.-data mismatches (which likely should use {@link SQLDataException}), * data file format errors, resource availability errors (which might use * {@link SQLTransientException}), or internal Drill errors.) *

*

* TODO: Consider using ANSI-/XOPEN-standard SQL State values. (See: *

* *

* etc.) *

*/ public class JdbcApiSqlException extends SQLNonTransientException { private static final long serialVersionUID = 2014_12_12L; /** * See {@link SQLException#SQLException(String, String, int)}. */ public JdbcApiSqlException( String reason, String SQLState, int vendorCode ) { super( reason, SQLState, vendorCode ); } /** * See {@link SQLException#SQLException(String, String)}. */ public JdbcApiSqlException( String reason, String SQLState ) { super( reason, SQLState ); } /** * See {@link SQLException#SQLException(String)}. */ public JdbcApiSqlException( String reason ) { super( reason ); } /** * See {@link SQLException#SQLException()}. * */ public JdbcApiSqlException() { super(); } /** * See {@link SQLException#SQLException(Throwable cause)}. */ public JdbcApiSqlException( Throwable cause ) { super( cause ); } /** * See {@link SQLException#SQLException(String, Throwable)}. */ public JdbcApiSqlException( String reason, Throwable cause ) { super( reason, cause ); } /** * See {@link SQLException#SQLException(String, String, Throwable)}. */ public JdbcApiSqlException( String reason, String sqlState, Throwable cause ) { super( reason, sqlState, cause ); } /** * See {@link SQLException#SQLException(String, String, int, Throwable)}. */ public JdbcApiSqlException( String reason, String sqlState, int vendorCode, Throwable cause ) { super( reason, sqlState, vendorCode, cause ); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy