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: DataStoreProviderException.java,v 1.2 2008/06/25 05:47:27 qcheng Exp $ 026 * 027 */ 028 029package com.sun.identity.plugin.datastore; 030 031import com.sun.identity.shared.locale.L10NMessageImpl; 032 033/** 034 * This class is to handle DataStoreProvider related exceptions. 035 * 036 * @supported.all.api 037 */ 038public class DataStoreProviderException extends L10NMessageImpl { 039 040 /** 041 * Constructs a <code>DataStoreProviderException</code> with a detailed 042 * message. 043 * 044 * @param message Detailed message for this exception. 045 */ 046 public DataStoreProviderException(String message) { 047 super(message); 048 } 049 050 /** 051 * Constructs a <code>DataStoreProviderException</code> with 052 * an embedded exception. 053 * 054 * @param rootCause An embedded exception 055 */ 056 public DataStoreProviderException(Throwable rootCause) { 057 super(rootCause); 058 } 059 060 /** 061 * Constructs a <code>DataStoreProviderException</code> with an exception. 062 * 063 * @param ex an exception 064 */ 065 public DataStoreProviderException(Exception ex) { 066 super(ex); 067 } 068 069 /** 070 * Constructs a new <code>DataStoreProviderException</code> without a nested 071 * <code>Throwable</code>. 072 * @param rbName Resource Bundle Name to be used for getting 073 * localized error message. 074 * @param errorCode Key to resource bundle. You can use 075 * <pre> 076 * ResourceBundle rb = ResourceBunde.getBundle (rbName,locale); 077 * String localizedStr = rb.getString(errorCode); 078 * </pre> 079 * @param args arguments to message. If it is not present pass them 080 * as null 081 * 082 */ 083 public DataStoreProviderException( 084 String rbName, 085 String errorCode, 086 Object[] args) 087 { 088 super(rbName, errorCode, args); 089 } 090 091}