KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > module > admininterface > InvalidTreeHandlerException


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2006 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.module.admininterface;
14
15 /**
16  * Runtime Exception thrown when a tree handler can't be instantiated.
17  * @author Fabrizio Giustina
18  * @version $Revision: 6341 $ ($Author: philipp $)
19  */

20 public class InvalidTreeHandlerException extends RuntimeException JavaDoc {
21
22     /**
23      * Stable serialVersionUID.
24      */

25     private static final long serialVersionUID = 222L;
26
27     /**
28      * Instantiates a new exception. Use this constructor when configuration is missing.
29      * @param treeName missing tree name
30      */

31     public InvalidTreeHandlerException(String JavaDoc treeName) {
32         super("No tree handler for [" + treeName + "] found"); //$NON-NLS-1$ //$NON-NLS-2$
33
}
34
35     /**
36      * Instantiates a new exception. Use this constructor when the tree handler can't be instantiated due to a previous
37      * exception.
38      * @param treeName tree name
39      * @param treeName previous exception
40      */

41     public InvalidTreeHandlerException(String JavaDoc treeName, Throwable JavaDoc cause) {
42         super("Unable to instantiate a tree handler for [" //$NON-NLS-1$
43
+ treeName
44             + "] due to a " //$NON-NLS-1$
45
+ cause.getClass().getName()
46             + " exception", cause); //$NON-NLS-1$
47
}
48
49 }
50
Popular Tags