Path: blob/master/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/PKCS11RuntimeException.java
41161 views
/*1* reserved comment block2* DO NOT REMOVE OR ALTER!3*/4/* Copyright (c) 2002 Graz University of Technology. All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions are met:8*9* 1. Redistributions of source code must retain the above copyright notice,10* this list of conditions and the following disclaimer.11*12* 2. Redistributions in binary form must reproduce the above copyright notice,13* this list of conditions and the following disclaimer in the documentation14* and/or other materials provided with the distribution.15*16* 3. The end-user documentation included with the redistribution, if any, must17* include the following acknowledgment:18*19* "This product includes software developed by IAIK of Graz University of20* Technology."21*22* Alternately, this acknowledgment may appear in the software itself, if23* and wherever such third-party acknowledgments normally appear.24*25* 4. The names "Graz University of Technology" and "IAIK of Graz University of26* Technology" must not be used to endorse or promote products derived from27* this software without prior written permission.28*29* 5. Products derived from this software may not be called30* "IAIK PKCS Wrapper", nor may "IAIK" appear in their name, without prior31* written permission of Graz University of Technology.32*33* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED34* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED35* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR36* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LICENSOR BE37* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,38* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,39* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,40* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON41* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,42* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY43* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE44* POSSIBILITY OF SUCH DAMAGE.45*/4647package sun.security.pkcs11.wrapper;484950/**51* This is the superclass of all runtime exception used by this library.52* For instance, Runtime exceptions occur, if an internal error in the native53* part of the wrapper occurs.54*55* @author <a href="mailto:[email protected]"> Karl Scheibelhofer </a>56* @invariants57*/58public class PKCS11RuntimeException extends RuntimeException {59private static final long serialVersionUID = 7889842162743590564L;6061/**62* Empty constructor.63*64* @preconditions65* @postconditions66*/67public PKCS11RuntimeException() {68super();69}7071/**72* Constructor taking a string that describes the reason of the exception73* in more detail.74*75* @param message A descrption of the reason for this exception.76* @preconditions77* @postconditions78*/79public PKCS11RuntimeException(String message) {80super(message);81}8283/**84* Constructor taking an other exception to wrap.85*86* @param encapsulatedException The other exception the wrap into this.87* @preconditions88* @postconditions89*/90public PKCS11RuntimeException(Exception encapsulatedException) {91super(encapsulatedException);92}9394/**95* Constructor taking a message for this exception and an other exception to96* wrap.97*98* @param message The message giving details about the exception to ease99* debugging.100* @param encapsulatedException The other exception the wrap into this.101* @preconditions102* @postconditions103*/104public PKCS11RuntimeException(String message, Exception encapsulatedException) {105super(message, encapsulatedException);106}107108}109110111