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