Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/net/ssl/SSLException.java
38918 views
/*1* Copyright (c) 1996, 2004, 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*/242526package javax.net.ssl;2728import java.io.IOException;2930/**31* Indicates some kind of error detected by an SSL subsystem.32* This class is the general class of exceptions produced33* by failed SSL-related operations.34*35* @since 1.436* @author David Brownell37*/38public39class SSLException extends IOException40{41private static final long serialVersionUID = 4511006460650708967L;4243/**44* Constructs an exception reporting an error found by45* an SSL subsystem.46*47* @param reason describes the problem.48*/49public SSLException(String reason)50{51super(reason);52}5354/**55* Creates a <code>SSLException</code> with the specified56* detail message and cause.57*58* @param message the detail message (which is saved for later retrieval59* by the {@link #getMessage()} method).60* @param cause the cause (which is saved for later retrieval by the61* {@link #getCause()} method). (A <tt>null</tt> value is62* permitted, and indicates that the cause is nonexistent or63* unknown.)64* @since 1.565*/66public SSLException(String message, Throwable cause) {67super(message);68initCause(cause);69}7071/**72* Creates a <code>SSLException</code> with the specified cause73* and a detail message of <tt>(cause==null ? null : cause.toString())</tt>74* (which typically contains the class and detail message of75* <tt>cause</tt>).76*77* @param cause the cause (which is saved for later retrieval by the78* {@link #getCause()} method). (A <tt>null</tt> value is79* permitted, and indicates that the cause is nonexistent or80* unknown.)81* @since 1.582*/83public SSLException(Throwable cause) {84super(cause == null ? null : cause.toString());85initCause(cause);86}87}888990