KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > script > IllegalExpressionException


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * $Header:$
17  */

18 package org.apache.beehive.netui.script;
19
20 // java imports
21

22 // internal imports
23

24 // external imports
25

26 /**
27  * An exception thrown when an expression is written in an illegal syntax.
28  */

29 public class IllegalExpressionException
30     extends RuntimeExpressionException {
31
32     private String JavaDoc expression = null;
33
34     /**
35      * Construct an IllegalExpressionException.
36      */

37     public IllegalExpressionException() {
38         super();
39     }
40
41     /**
42      * Construct an IllegalExpressionException with the given message.
43      *
44      * @param message a String containing the text of the exception message
45      */

46     public IllegalExpressionException(String JavaDoc message) {
47         super(message);
48     }
49
50     /**
51      * Construct an IllegalExpressionException with the given cause
52      *
53      * @param cause a <code>Throwable<code> that caused this exception to be thrown
54      */

55     public IllegalExpressionException(Throwable JavaDoc cause) {
56         super(cause);
57     }
58
59     /**
60      * Construct an IllegalExpressionException with the given <code>message</code> and <code>cause</code>.
61      *
62      * @param message a String containing the text of the exception message
63      * @param cause a <code>Throwable</code> that caused this exception to be thrown
64      */

65     public IllegalExpressionException(String JavaDoc message, Throwable JavaDoc cause) {
66         super(message, cause);
67     }
68
69     /**
70      * Construct an IllegalExpressionException with the given <code>message</code> and the malformed expression.
71      *
72      * @param message a String containing the text of this exception message
73      * @param expression the expression that was malformed and caused this exception to be thrown
74      */

75     public IllegalExpressionException(String JavaDoc message, String JavaDoc expression) {
76         this(message);
77         this.expression = expression;
78     }
79
80     /**
81      * Construct an IllegalExpressionException with the given <code>message</code>, the malformed expression, and the <code>cause</code>.
82      *
83      * @param message a String containing the text of this exception message
84      * @param expression the expression that was malformed and caused this exception to be thrown
85      * @param cause a <code>Throwable</code> that caused this exception to be thrown
86      */

87     public IllegalExpressionException(String JavaDoc message, String JavaDoc expression, Throwable JavaDoc cause) {
88         this(message, cause);
89         this.expression = expression;
90     }
91
92     /**
93      * Get the malformed expression.
94      *
95      * @return the malformed expression
96      */

97     public String JavaDoc getExpression() {
98         return expression;
99     }
100 }
101
102
Popular Tags