001 /*
002 * Copyright 2000-2003 Sun Microsystems, Inc. All Rights Reserved.
003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004 *
005 * This code is free software; you can redistribute it and/or modify it
006 * under the terms of the GNU General Public License version 2 only, as
007 * published by the Free Software Foundation. Sun designates this
008 * particular file as subject to the "Classpath" exception as provided
009 * by Sun in the LICENSE file that accompanied this code.
010 *
011 * This code is distributed in the hope that it will be useful, but WITHOUT
012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014 * version 2 for more details (a copy is included in the LICENSE file that
015 * accompanied this code).
016 *
017 * You should have received a copy of the GNU General Public License version
018 * 2 along with this work; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020 *
021 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022 * CA 95054 USA or visit www.sun.com if you need additional information or
023 * have any questions.
024 */
025
026 package java.security.cert;
027
028 import java.security.GeneralSecurityException;
029
030 /**
031 * An exception indicating one of a variety of problems retrieving
032 * certificates and CRLs from a <code>CertStore</code>.
033 * <p>
034 * A <code>CertStoreException</code> provides support for wrapping
035 * exceptions. The {@link #getCause getCause} method returns the throwable,
036 * if any, that caused this exception to be thrown.
037 * <p>
038 * <b>Concurrent Access</b>
039 * <p>
040 * Unless otherwise specified, the methods defined in this class are not
041 * thread-safe. Multiple threads that need to access a single
042 * object concurrently should synchronize amongst themselves and
043 * provide the necessary locking. Multiple threads each manipulating
044 * separate objects need not synchronize.
045 *
046 * @see CertStore
047 *
048 * @version 1.14 05/05/07
049 * @since 1.4
050 * @author Sean Mullan
051 */
052 public class CertStoreException extends GeneralSecurityException {
053
054 private static final long serialVersionUID = 2395296107471573245L;
055
056 /**
057 * Creates a <code>CertStoreException</code> with <code>null</code> as
058 * its detail message.
059 */
060 public CertStoreException() {
061 super ();
062 }
063
064 /**
065 * Creates a <code>CertStoreException</code> with the given detail
066 * message. A detail message is a <code>String</code> that describes this
067 * particular exception.
068 *
069 * @param msg the detail message
070 */
071 public CertStoreException(String msg) {
072 super (msg);
073 }
074
075 /**
076 * Creates a <code>CertStoreException</code> that wraps the specified
077 * throwable. This allows any exception to be converted into a
078 * <code>CertStoreException</code>, while retaining information about the
079 * cause, which may be useful for debugging. The detail message is
080 * set to (<code>cause==null ? null : cause.toString()</code>) (which
081 * typically contains the class and detail message of cause).
082 *
083 * @param cause the cause (which is saved for later retrieval by the
084 * {@link #getCause getCause()} method). (A <code>null</code> value is
085 * permitted, and indicates that the cause is nonexistent or unknown.)
086 */
087 public CertStoreException(Throwable cause) {
088 super (cause);
089 }
090
091 /**
092 * Creates a <code>CertStoreException</code> with the specified detail
093 * message and cause.
094 *
095 * @param msg the detail message
096 * @param cause the cause (which is saved for later retrieval by the
097 * {@link #getCause getCause()} method). (A <code>null</code> value is
098 * permitted, and indicates that the cause is nonexistent or unknown.)
099 */
100 public CertStoreException(String msg, Throwable cause) {
101 super(msg, cause);
102 }
103
104 }
|