Path: blob/master/src/java.base/share/classes/java/security/KeyManagementException.java
41152 views
/*1* Copyright (c) 1996, 2020, 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.security;2627/**28* This is the general key management exception for all operations29* dealing with key management. Examples of subclasses of30* KeyManagementException that developers might create for31* giving more detailed information could include:32*33* <ul>34* <li>KeyIDConflictException35* <li>KeyAuthorizationFailureException36* <li>ExpiredKeyException37* </ul>38*39* @author Benjamin Renaud40* @since 1.141*42* @see Key43* @see KeyException44*/4546public class KeyManagementException extends KeyException {4748@java.io.Serial49private static final long serialVersionUID = 947674216157062695L;5051/**52* Constructs a KeyManagementException with no detail message. A53* detail message is a String that describes this particular54* exception.55*/56public KeyManagementException() {57super();58}5960/**61* Constructs a KeyManagementException with the specified detail62* message. A detail message is a String that describes this63* particular exception.64*65* @param msg the detail message.66*/67public KeyManagementException(String msg) {68super(msg);69}7071/**72* Creates a {@code KeyManagementException} with the specified73* detail message and cause.74*75* @param message the detail message (which is saved for later retrieval76* by the {@link #getMessage()} method).77* @param cause the cause (which is saved for later retrieval by the78* {@link #getCause()} method). (A {@code null} value is permitted,79* and indicates that the cause is nonexistent or unknown.)80* @since 1.581*/82public KeyManagementException(String message, Throwable cause) {83super(message, cause);84}8586/**87* Creates a {@code KeyManagementException} with the specified cause88* and a detail message of {@code (cause==null ? null : cause.toString())}89* (which typically contains the class and detail message of90* {@code cause}).91*92* @param cause the cause (which is saved for later retrieval by the93* {@link #getCause()} method). (A {@code null} value is permitted,94* and indicates that the cause is nonexistent or unknown.)95* @since 1.596*/97public KeyManagementException(Throwable cause) {98super(cause);99}100}101102103