01 /*
02 * Copyright 1996-2004 Sun Microsystems, Inc. All Rights Reserved.
03 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04 *
05 * This code is free software; you can redistribute it and/or modify it
06 * under the terms of the GNU General Public License version 2 only, as
07 * published by the Free Software Foundation. Sun designates this
08 * particular file as subject to the "Classpath" exception as provided
09 * by Sun in the LICENSE file that accompanied this code.
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 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25
26 package javax.net.ssl;
27
28 import java.io.IOException;
29
30 /**
31 * Indicates some kind of error detected by an SSL subsystem.
32 * This class is the general class of exceptions produced
33 * by failed SSL-related operations.
34 *
35 * @since 1.4
36 * @version 1.19
37 * @author David Brownell
38 */
39 public class SSLException extends IOException {
40 private static final long serialVersionUID = 4511006460650708967L;
41
42 /**
43 * Constructs an exception reporting an error found by
44 * an SSL subsystem.
45 *
46 * @param reason describes the problem.
47 */
48 public SSLException(String reason) {
49 super (reason);
50 }
51
52 /**
53 * Creates a <code>SSLException</code> with the specified
54 * detail message and cause.
55 *
56 * @param message the detail message (which is saved for later retrieval
57 * by the {@link #getMessage()} method).
58 * @param cause the cause (which is saved for later retrieval by the
59 * {@link #getCause()} method). (A <tt>null</tt> value is
60 * permitted, and indicates that the cause is nonexistent or
61 * unknown.)
62 * @since 1.5
63 */
64 public SSLException(String message, Throwable cause) {
65 super (message);
66 initCause(cause);
67 }
68
69 /**
70 * Creates a <code>SSLException</code> with the specified cause
71 * and a detail message of <tt>(cause==null ? null : cause.toString())</tt>
72 * (which typically contains the class and detail message of
73 * <tt>cause</tt>).
74 *
75 * @param cause the cause (which is saved for later retrieval by the
76 * {@link #getCause()} method). (A <tt>null</tt> value is
77 * permitted, and indicates that the cause is nonexistent or
78 * unknown.)
79 * @since 1.5
80 */
81 public SSLException(Throwable cause) {
82 super(cause == null ? null : cause.toString());
83 initCause(cause);
84 }
85 }
|