View Javadoc

1   /**
2    * Licensed under the Artistic License; you may not use this file
3    * except in compliance with the License.
4    * You may obtain a copy of the License at
5    *
6    *      http://displaytag.sourceforge.net/license.html
7    *
8    * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
9    * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11   */
12  package org.displaytag.exception;
13  
14  import org.displaytag.Messages;
15  import org.displaytag.util.TagConstants;
16  
17  
18  /**
19   * Exception thrown when DecoratorFactory is unable to load a Decorator.
20   * @author Fabrizio Giustina
21   * @version $Revision: 1081 $ ($Author: fgiust $)
22   */
23  public class DecoratorInstantiationException extends BaseNestableJspTagException
24  {
25  
26      /**
27       * D1597A17A6.
28       */
29      private static final long serialVersionUID = 899149338534L;
30  
31      /**
32       * Constructor for DecoratorInstantiationException.
33       * @param source Class where the exception is generated
34       * @param decorator decorator name
35       * @param cause previous Exception
36       */
37      public DecoratorInstantiationException(Class source, String decorator, Throwable cause)
38      {
39          super(source, Messages.getString("DecoratorInstantiationException.msg" //$NON-NLS-1$
40              , new Object[]{decorator, (cause != null ? cause.getClass().getName() : TagConstants.EMPTY_STRING)}), //
41              cause);
42      }
43  
44      /**
45       * @return SeverityEnum.ERROR
46       * @see org.displaytag.exception.BaseNestableJspTagException#getSeverity()
47       * @see org.displaytag.exception.SeverityEnum
48       */
49      public SeverityEnum getSeverity()
50      {
51          return SeverityEnum.ERROR;
52      }
53  
54  }