001/** 002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 003 * 004 * Copyright (c) 2005 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: IdRepoFatalException.java,v 1.3 2008/06/25 05:43:28 qcheng Exp $ 026 * 027 * Portions Copyrighted 2015 ForgeRock AS. 028 */ 029 030package com.sun.identity.idm; 031 032import org.forgerock.opendj.ldap.ResultCode; 033 034/** 035 * The exception class whose instance is thrown if there is any error during the 036 * operation of objects of the <code>com.sun.identity.sms</code> package. This 037 * class maps the exception that occurred at a lower level to a high level 038 * error. Using the exception status code <code>getExceptionCode()</code> the 039 * errors are categorized as a <code>ABORT</code>, <code>RETRY</code>, 040 * <code>CONFIG_PROBLEM</code> or <code>LDAP_OP_FAILED</code> (typically a 041 * bug). 042 * 043 * @supported.all.api 044 */ 045public class IdRepoFatalException extends IdRepoException { 046 047 /** 048 * @param msg 049 * The message provided by the object which is throwing the 050 * exception 051 */ 052 public IdRepoFatalException(String msg) { 053 super(msg); 054 055 } 056 057 public IdRepoFatalException(String msg, String errorCode) { 058 super(msg, errorCode); 059 } 060 061 /** 062 * This constructor is used to pass the localized error message At this 063 * level, the locale of the caller is not known and it is not possible to 064 * throw localized error message at this level. Instead this constructor 065 * provides Resource Bundle name and error code for correctly locating the 066 * error message. The default <code>getMessage()</code> will always return 067 * English messages only. This is in consistent with current JRE. 068 * 069 * @param rbName 070 * Resource bundle Name to be used for getting localized error 071 * message. 072 * @param errorCode 073 * Key to resource bundle. You can use <code>ResourceBundle rb = 074 * ResourceBunde.getBundle(rbName,locale); 075 * String localizedStr = rb.getString(errorCode)</code>. 076 * @param args 077 * arguments to message. If it is not present pass the as null. 078 */ 079 public IdRepoFatalException(String rbName, String errorCode, Object[] args) { 080 super(rbName, errorCode, args); 081 } 082 083 /** 084 * This constructor is used to pass the localized error message At this 085 * level, the locale of the caller is not known and it is not possible to 086 * throw localized error message at this level. Instead this constructor 087 * provides Resource Bundle name ,error code and LDAP Result Code ( in case 088 * of LDAP related exception for correctly locating the 089 * error message. The default <code>getMessage()</code> will always return 090 * English messages only. This is in consistent with current JRE. 091 * 092 * @param rbName 093 * Resource bundle Name to be used for getting localized error 094 * message. 095 * @param errorCode 096 * Key to resource bundle. You can use <code>ResourceBundle rb = 097 * ResourceBunde.getBundle(rbName,locale); 098 * String localizedStr = rb.getString(errorCode)</code>. 099 * @param ldapResultCode 100 * ldap result code 101 * @param args 102 * arguments to message. If it is not present pass the as null. 103 */ 104 public IdRepoFatalException(String rbName, String errorCode, ResultCode ldapResultCode, Object[] args) { 105 super(rbName, errorCode, ldapResultCode, args); 106 } 107}