Path: blob/master/src/java.base/share/classes/java/security/InvalidAlgorithmParameterException.java
41152 views
/*1* Copyright (c) 1997, 2019, 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 exception for invalid or inappropriate algorithm parameters.29*30* @author Jan Luehe31*32*33* @see AlgorithmParameters34* @see java.security.spec.AlgorithmParameterSpec35*36* @since 1.237*/3839public class InvalidAlgorithmParameterException40extends GeneralSecurityException {4142@java.io.Serial43private static final long serialVersionUID = 2864672297499471472L;4445/**46* Constructs an InvalidAlgorithmParameterException with no detail47* message.48* A detail message is a String that describes this particular49* exception.50*/51public InvalidAlgorithmParameterException() {52super();53}5455/**56* Constructs an InvalidAlgorithmParameterException with the specified57* detail message.58* A detail message is a String that describes this59* particular exception.60*61* @param msg the detail message.62*/63public InvalidAlgorithmParameterException(String msg) {64super(msg);65}6667/**68* Creates an {@code InvalidAlgorithmParameterException} with the69* specified detail message and cause.70*71* @param message the detail message (which is saved for later retrieval72* by the {@link #getMessage()} method).73* @param cause the cause (which is saved for later retrieval by the74* {@link #getCause()} method). (A {@code null} value is permitted,75* and indicates that the cause is nonexistent or unknown.)76* @since 1.577*/78public InvalidAlgorithmParameterException(String message, Throwable cause) {79super(message, cause);80}8182/**83* Creates an {@code InvalidAlgorithmParameterException} with the84* specified cause and a detail message of85* {@code (cause==null ? null : cause.toString())}86* (which typically contains the class and detail message of87* {@code cause}).88*89* @param cause the cause (which is saved for later retrieval by the90* {@link #getCause()} method). (A {@code null} value is permitted,91* and indicates that the cause is nonexistent or unknown.)92* @since 1.593*/94public InvalidAlgorithmParameterException(Throwable cause) {95super(cause);96}97}9899100