author | darcy |
Thu, 29 Aug 2019 16:31:34 -0700 | |
changeset 57956 | e0b8b019d2f5 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
57956
e0b8b019d2f5
8229997: Apply java.io.Serial annotations in java.base
darcy
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 1996, 2019, 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 |
||
27 |
package javax.net.ssl; |
|
28 |
||
29 |
import java.io.IOException; |
|
30 |
||
31 |
/** |
|
32 |
* Indicates some kind of error detected by an SSL subsystem. |
|
33 |
* This class is the general class of exceptions produced |
|
34 |
* by failed SSL-related operations. |
|
35 |
* |
|
36 |
* @since 1.4 |
|
37 |
* @author David Brownell |
|
38 |
*/ |
|
39 |
public |
|
40 |
class SSLException extends IOException |
|
41 |
{ |
|
57956
e0b8b019d2f5
8229997: Apply java.io.Serial annotations in java.base
darcy
parents:
47216
diff
changeset
|
42 |
@java.io.Serial |
2 | 43 |
private static final long serialVersionUID = 4511006460650708967L; |
44 |
||
45 |
/** |
|
46 |
* Constructs an exception reporting an error found by |
|
47 |
* an SSL subsystem. |
|
48 |
* |
|
49 |
* @param reason describes the problem. |
|
50 |
*/ |
|
51 |
public SSLException(String reason) |
|
52 |
{ |
|
53 |
super(reason); |
|
54 |
} |
|
55 |
||
56 |
/** |
|
32210
958d823579c3
8133480: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents:
25859
diff
changeset
|
57 |
* Creates a {@code SSLException} with the specified |
2 | 58 |
* detail message and cause. |
59 |
* |
|
60 |
* @param message the detail message (which is saved for later retrieval |
|
61 |
* by the {@link #getMessage()} method). |
|
62 |
* @param cause the cause (which is saved for later retrieval by the |
|
32210
958d823579c3
8133480: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents:
25859
diff
changeset
|
63 |
* {@link #getCause()} method). (A {@code null} value is |
2 | 64 |
* permitted, and indicates that the cause is nonexistent or |
65 |
* unknown.) |
|
66 |
* @since 1.5 |
|
67 |
*/ |
|
68 |
public SSLException(String message, Throwable cause) { |
|
69 |
super(message); |
|
70 |
initCause(cause); |
|
71 |
} |
|
72 |
||
73 |
/** |
|
32210
958d823579c3
8133480: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents:
25859
diff
changeset
|
74 |
* Creates a {@code SSLException} with the specified cause |
958d823579c3
8133480: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents:
25859
diff
changeset
|
75 |
* and a detail message of {@code (cause==null ? null : cause.toString())} |
2 | 76 |
* (which typically contains the class and detail message of |
32210
958d823579c3
8133480: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents:
25859
diff
changeset
|
77 |
* {@code cause}). |
2 | 78 |
* |
79 |
* @param cause the cause (which is saved for later retrieval by the |
|
32210
958d823579c3
8133480: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents:
25859
diff
changeset
|
80 |
* {@link #getCause()} method). (A {@code null} value is |
2 | 81 |
* permitted, and indicates that the cause is nonexistent or |
82 |
* unknown.) |
|
83 |
* @since 1.5 |
|
84 |
*/ |
|
85 |
public SSLException(Throwable cause) { |
|
86 |
super(cause == null ? null : cause.toString()); |
|
87 |
initCause(cause); |
|
88 |
} |
|
89 |
} |