KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > core > config > node > NodeCreationException


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.core.config.node;
19
20
21 /**
22  * Signifies there was a problem creating a <code>Node</code>.
23  *
24  * Copyright 2002 Sapient
25  * @since carbon 1.0
26  * @author Douglas Voet, February 2002
27  * @version $Revision: 1.16 $($Author: dvoet $ / $Date: 2003/05/05 21:21:18 $)
28  */

29 public class NodeCreationException extends NodeException {
30
31     /**
32      * Creates a NodeCreationException.
33      * @param sourceClass the class in which this exception occurred.
34      * @param parent the Parent Node in which the child node was attempted
35      * to be created.
36      * @param nodeName the name of the node that was attempted to be created.
37      * @param message the reason for the failure to created the node.
38      * @param previousException the exception that caused this failure.
39      */

40     public NodeCreationException(
41         Class JavaDoc sourceClass,
42         Node parent,
43         String JavaDoc nodeName,
44         String JavaDoc message, Throwable JavaDoc previousException) {
45
46         super(sourceClass,
47             nodeName,
48             "The node in Folder [" + parent.getAbsoluteName()
49                 + "] could not be created. Reason: " + message,
50             previousException);
51     }
52
53     /**
54      * Creates a NodeCreationException.
55      * @param sourceClass the class in which this exception occurred.
56      * @param parent the Parent Node in which the child node was attempted
57      * to be created.
58      * @param nodeName the name of the node that was attempted to be created.
59      * @param message the reason for the failure to created the node.
60      */

61     public NodeCreationException(
62         Class JavaDoc sourceClass,
63         Node parent,
64         String JavaDoc nodeName,
65         String JavaDoc message) {
66
67         super(sourceClass,
68             nodeName,
69             "The node named in Folder ["
70                 + (parent == null ? "" : parent.getAbsoluteName())
71                 + "] could not be created. Reason: "
72                 + message);
73     }
74
75 }
76
Popular Tags