author | kbarrett |
Fri, 15 Nov 2019 16:58:29 -0500 | |
changeset 59115 | a129f10e1b9a |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
21278
diff
changeset
|
2 |
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package java.sql; |
|
27 |
||
28 |
/** |
|
29 |
* The subclass of {@link SQLException} is thrown in situations where a |
|
21278 | 30 |
* previously failed operation might be able to succeed when the operation is |
2 | 31 |
* retried without any intervention by application-level functionality. |
32 |
* |
|
33 |
* @since 1.6 |
|
34 |
*/ |
|
35 |
public class SQLTransientException extends java.sql.SQLException { |
|
36 |
||
37 |
/** |
|
38 |
* Constructs a <code>SQLTransientException</code> object. |
|
39 |
* The <code>reason</code>, <code>SQLState</code> are initialized |
|
40 |
* to <code>null</code> and the vendor code is initialized to 0. |
|
41 |
* |
|
42 |
* The <code>cause</code> is not initialized, and may subsequently be |
|
43 |
* initialized by a call to the |
|
44 |
* {@link Throwable#initCause(java.lang.Throwable)} method. |
|
23590 | 45 |
* |
2 | 46 |
* @since 1.6 |
47 |
*/ |
|
48 |
public SQLTransientException() { |
|
49 |
super(); |
|
50 |
} |
|
51 |
||
52 |
/** |
|
53 |
* Constructs a <code>SQLTransientException</code> object |
|
54 |
* with a given <code>reason</code>. The <code>SQLState</code> |
|
21278 | 55 |
* is initialized to <code>null</code> and the vendor code is initialized |
2 | 56 |
* to 0. |
57 |
* |
|
58 |
* The <code>cause</code> is not initialized, and may subsequently be |
|
59 |
* initialized by a call to the |
|
60 |
* {@link Throwable#initCause(java.lang.Throwable)} method. |
|
23590 | 61 |
* |
2 | 62 |
* @param reason a description of the exception |
63 |
* @since 1.6 |
|
64 |
*/ |
|
65 |
public SQLTransientException(String reason) { |
|
66 |
super(reason); |
|
67 |
} |
|
68 |
||
69 |
/** |
|
70 |
* Constructs a <code>SQLTransientException</code> object |
|
71 |
* with a given <code>reason</code> and <code>SQLState</code>. |
|
72 |
* |
|
73 |
* The <code>cause</code> is not initialized, and may subsequently be |
|
74 |
* initialized by a call to the |
|
75 |
* {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code |
|
76 |
* is initialized to 0. |
|
23590 | 77 |
* |
2 | 78 |
* @param reason a description of the exception |
79 |
* @param SQLState an XOPEN or SQL:2003 code identifying the exception |
|
80 |
* @since 1.6 |
|
81 |
*/ |
|
82 |
public SQLTransientException(String reason, String SQLState) { |
|
83 |
super(reason,SQLState); |
|
84 |
} |
|
85 |
||
86 |
/** |
|
87 |
* Constructs a <code>SQLTransientException</code> object |
|
88 |
* with a given <code>reason</code>, <code>SQLState</code> and |
|
89 |
* <code>vendorCode</code>. |
|
90 |
* |
|
91 |
* The <code>cause</code> is not initialized, and may subsequently be |
|
92 |
* initialized by a call to the |
|
93 |
* {@link Throwable#initCause(java.lang.Throwable)} method. |
|
23590 | 94 |
* |
2 | 95 |
* @param reason a description of the exception |
96 |
* @param SQLState an XOPEN or SQL:2003 code identifying the exception |
|
97 |
* @param vendorCode a database vendor specific exception code |
|
98 |
* @since 1.6 |
|
99 |
*/ |
|
100 |
public SQLTransientException(String reason, String SQLState, int vendorCode) { |
|
101 |
super(reason,SQLState,vendorCode); |
|
102 |
} |
|
103 |
||
104 |
/** |
|
105 |
* Constructs a <code>SQLTransientException</code> object |
|
106 |
* with a given <code>cause</code>. |
|
107 |
* The <code>SQLState</code> is initialized |
|
108 |
* to <code>null</code> and the vendor code is initialized to 0. |
|
109 |
* The <code>reason</code> is initialized to <code>null</code> if |
|
110 |
* <code>cause==null</code> or to <code>cause.toString()</code> if |
|
111 |
* <code>cause!=null</code>. |
|
23590 | 112 |
* |
2 | 113 |
* @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 indicating |
114 |
* the cause is non-existent or unknown. |
|
115 |
* @since 1.6 |
|
116 |
*/ |
|
117 |
public SQLTransientException(Throwable cause) { |
|
118 |
super(cause); |
|
119 |
} |
|
120 |
||
121 |
/** |
|
122 |
* Constructs a <code>SQLTransientException</code> object |
|
123 |
* with a given |
|
124 |
* <code>reason</code> and <code>cause</code>. |
|
125 |
* The <code>SQLState</code> is initialized to <code>null</code> |
|
126 |
* and the vendor code is initialized to 0. |
|
23590 | 127 |
* |
2 | 128 |
* @param reason a description of the exception. |
129 |
* @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 indicating |
|
130 |
* the cause is non-existent or unknown. |
|
131 |
* @since 1.6 |
|
132 |
*/ |
|
133 |
public SQLTransientException(String reason, Throwable cause) { |
|
134 |
super(reason,cause); |
|
135 |
} |
|
136 |
||
137 |
/** |
|
138 |
* Constructs a <code>SQLTransientException</code> object |
|
139 |
* with a given |
|
140 |
* <code>reason</code>, <code>SQLState</code> and <code>cause</code>. |
|
141 |
* The vendor code is initialized to 0. |
|
23590 | 142 |
* |
2 | 143 |
* @param reason a description of the exception. |
144 |
* @param SQLState an XOPEN or SQL:2003 code identifying the exception |
|
145 |
* @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 indicating |
|
146 |
* the cause is non-existent or unknown. |
|
147 |
* @since 1.6 |
|
148 |
*/ |
|
149 |
public SQLTransientException(String reason, String SQLState, Throwable cause) { |
|
150 |
super(reason,SQLState,cause); |
|
151 |
} |
|
152 |
||
153 |
/** |
|
154 |
* Constructs a <code>SQLTransientException</code> object |
|
155 |
* with a given |
|
156 |
* <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code> |
|
157 |
* and <code>cause</code>. |
|
23590 | 158 |
* |
2 | 159 |
* @param reason a description of the exception |
160 |
* @param SQLState an XOPEN or SQL:2003 code identifying the exception |
|
161 |
* @param vendorCode a database vendor-specific exception code |
|
162 |
* @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 indicating |
|
163 |
* the cause is non-existent or unknown. |
|
164 |
* @since 1.6 |
|
165 |
*/ |
|
166 |
public SQLTransientException(String reason, String SQLState, int vendorCode, Throwable cause) { |
|
167 |
super(reason,SQLState,vendorCode,cause); |
|
168 |
} |
|
169 |
||
170 |
private static final long serialVersionUID = -9042733978262274539L; |
|
171 |
} |