Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/java/sql/SQLNonTransientConnectionException.java
38829 views
/*1* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.sql;2627/**28* The subclass of {@link SQLException} thrown for the SQLState29* class value '<i>08</i>', or under vendor-specified conditions. This30* indicates that the connection operation that failed will not succeed if31* the operation is retried without the cause of the failure being corrected.32* <p>33* Please consult your driver vendor documentation for the vendor-specified34* conditions for which this <code>Exception</code> may be thrown.35* @since 1.636*/37public class SQLNonTransientConnectionException extends java.sql.SQLNonTransientException {3839/**40* Constructs a <code>SQLNonTransientConnectionException</code> object.41* The <code>reason</code>, <code>SQLState</code> are initialized42* to <code>null</code> and the vendor code is initialized to 0.43*44* The <code>cause</code> is not initialized, and may subsequently be45* initialized by a call to the46* {@link Throwable#initCause(java.lang.Throwable)} method.47* <p>48*49* @since 1.650*/51public SQLNonTransientConnectionException() {52super();53}5455/**56* Constructs a <code>SQLNonTransientConnectionException</code> object57* with a given <code>reason</code>. The <code>SQLState</code>58* is initialized to <code>null</code> and the vendor code is initialized59* to 0.60*61* The <code>cause</code> is not initialized, and may subsequently be62* initialized by a call to the63* {@link Throwable#initCause(java.lang.Throwable)} method.64* <p>65* @param reason a description of the exception66* @since 1.667*/68public SQLNonTransientConnectionException(String reason) {69super(reason);70}7172/**73* Constructs a <code>SQLNonTransientConnectionException</code> object74* with a given <code>reason</code> and <code>SQLState</code>.75*76* The <code>cause</code> is not initialized, and may subsequently be77* initialized by a call to the78* {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code79* is initialized to 0.80* <p>81* @param reason a description of the exception82* @param SQLState an XOPEN or SQL:2003 code identifying the exception83* @since 1.684*/85public SQLNonTransientConnectionException(String reason, String SQLState) {86super(reason,SQLState);87}8889/**90* Constructs a <code>SQLNonTransientConnectionException</code> object91* with a given <code>reason</code>, <code>SQLState</code> and92* <code>vendorCode</code>.93*94* The <code>cause</code> is not initialized, and may subsequently be95* initialized by a call to the96* {@link Throwable#initCause(java.lang.Throwable)} method.97* <p>98* @param reason a description of the exception99* @param SQLState an XOPEN or SQL:2003 code identifying the exception100* @param vendorCode a database vendor specific exception code101* @since 1.6102*/103public SQLNonTransientConnectionException(String reason, String SQLState, int vendorCode) {104super(reason,SQLState,vendorCode);105}106107/**108* Constructs a <code>SQLNonTransientConnectionException</code> object109* with a given <code>cause</code>.110* The <code>SQLState</code> is initialized111* to <code>null</code> and the vendor code is initialized to 0.112* The <code>reason</code> is initialized to <code>null</code> if113* <code>cause==null</code> or to <code>cause.toString()</code> if114* <code>cause!=null</code>.115* <p>116* @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating117* the cause is non-existent or unknown.118* @since 1.6119*/120public SQLNonTransientConnectionException(Throwable cause) {121super(cause);122}123124/**125* Constructs a <code>SQLTransientException</code> object126* with a given127* <code>reason</code> and <code>cause</code>.128* The <code>SQLState</code> is initialized to <code>null</code>129* and the vendor code is initialized to 0.130* <p>131* @param reason a description of the exception.132* @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating133* the cause is non-existent or unknown.134* @since 1.6135*/136public SQLNonTransientConnectionException(String reason, Throwable cause) {137super(reason,cause);138}139140/**141* Constructs a <code>SQLNonTransientConnectionException</code> object142* with a given143* <code>reason</code>, <code>SQLState</code> and <code>cause</code>.144* The vendor code is initialized to 0.145* <p>146* @param reason a description of the exception.147* @param SQLState an XOPEN or SQL:2003 code identifying the exception148* @param cause the (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating149* the cause is non-existent or unknown.150* @since 1.6151*/152public SQLNonTransientConnectionException(String reason, String SQLState, Throwable cause) {153super(reason,SQLState,cause);154}155156/**157* Constructs a <code>SQLNonTransientConnectionException</code> object158* with a given159* <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code>160* and <code>cause</code>.161* <p>162* @param reason a description of the exception163* @param SQLState an XOPEN or SQL:2003 code identifying the exception164* @param vendorCode a database vendor-specific exception code165* @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating166* the cause is non-existent or unknown.167* @since 1.6168*/169public SQLNonTransientConnectionException(String reason, String SQLState, int vendorCode, Throwable cause) {170super(reason,SQLState,vendorCode,cause);171}172173private static final long serialVersionUID = -5852318857474782892L;174175}176177178