001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2008 Sun Microsystems, Inc. 015 * Portions Copyright 2014 ForgeRock AS. 016 */ 017package org.opends.server.types; 018 019import org.forgerock.i18n.LocalizableMessage; 020 021 022 023/** 024 * This class defines a base exception that should be extended by any 025 * exception that exposes a unique identifier for the associated 026 * message. 027 */ 028@org.opends.server.types.PublicAPI( 029 stability=org.opends.server.types.StabilityLevel.VOLATILE, 030 mayInstantiate=false, 031 mayExtend=false, 032 mayInvoke=true) 033public abstract class IdentifiedException 034 extends OpenDsException 035{ 036 /** 037 * Generated serialization ID. 038 */ 039 private static final long serialVersionUID = 7071843225564003122L; 040 041 042 043 /** 044 * Creates a new identified exception. 045 */ 046 protected IdentifiedException() 047 { 048 super(); 049 } 050 051 052 053 /** 054 * Creates a new identified exception with the provided information. 055 * 056 * @param message The message that explains the problem that 057 * occurred. 058 */ 059 protected IdentifiedException(LocalizableMessage message) 060 { 061 super(message); 062 } 063 064 065 066 /** 067 * Creates a new identified exception with the provided information. 068 * 069 * @param cause The underlying cause that triggered this 070 * exception. 071 */ 072 protected IdentifiedException(Throwable cause) 073 { 074 super(cause); 075 } 076 077 078 079 /** 080 * Creates a new identified exception with the provided information. 081 * 082 * @param message The message that explains the problem that 083 * occurred. 084 * @param cause The underlying cause that triggered this 085 * exception. 086 */ 087 protected IdentifiedException(LocalizableMessage message, Throwable cause) 088 { 089 super(message, cause); 090 } 091 092} 093