001/**
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
005 *
006 * The contents of this file are subject to the terms
007 * of the Common Development and Distribution License
008 * (the License). You may not use this file except in
009 * compliance with the License.
010 *
011 * You can obtain a copy of the License at
012 * https://opensso.dev.java.net/public/CDDLv1.0.html or
013 * opensso/legal/CDDLv1.0.txt
014 * See the License for the specific language governing
015 * permission and limitations under the License.
016 *
017 * When distributing Covered Code, include this CDDL
018 * Header Notice in each file and include the License file
019 * at opensso/legal/CDDLv1.0.txt.
020 * If applicable, add the following below the CDDL Header,
021 * with the fields enclosed by brackets [] replaced by
022 * your own identifying information:
023 * "Portions Copyrighted [year] [name of copyright owner]"
024 *
025 * $Id: AuthnSvcException.java,v 1.2 2008/06/25 05:47:06 qcheng Exp $
026 *
027 */
028
029
030package com.sun.identity.liberty.ws.authnsvc;
031
032import com.sun.identity.shared.locale.L10NMessageImpl;
033
034/**
035 * This class is an extension point for all Authentication Service related 
036 * exceptions.
037 *
038 * @supported.all.api
039 */
040public class AuthnSvcException extends L10NMessageImpl {
041
042    /**
043     * Create an <code>AuthnSvcException</code> with a message.
044     *
045     * @param s exception message.
046     */
047    public AuthnSvcException(String s) {
048        super(s);
049        fillInStackTrace();
050    }
051
052    /**
053     * Constructs with <code>Throwable</code> object.
054     * @param t <code>Throwable</code> object 
055     */
056    public AuthnSvcException(Throwable t) {
057        super(t.getMessage());
058        fillInStackTrace();
059    }
060
061    /**
062     * Constructs a new <code>AuthnSvcException</code> without a nested
063     * <code>Throwable</code>.
064     * @param rbName Resource Bundle Name to be used for getting
065     * localized error message.
066     * @param errorCode Key to resource bundle. You can use
067     * <pre>
068     * ResourceBundle rb = ResourceBunde.getBundle (rbName,locale);
069     * String localizedStr = rb.getString(errorCode);
070     * </pre>
071     * @param args arguments to message. If it is not present pass them
072     * as null
073     *
074     */
075    public AuthnSvcException(String rbName, String errorCode, Object[] args) {
076        super(rbName, errorCode, args);
077    }
078}