01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: * $Header:$
18: */
19: package org.apache.beehive.netui.script;
20:
21: /**
22: * Exception thrown when an expression contains illegal syntax.
23: */
24: public class IllegalExpressionException extends
25: RuntimeExpressionException {
26:
27: private String expression = null;
28:
29: /**
30: * Construct an IllegalExpressionException.
31: */
32: public IllegalExpressionException() {
33: super ();
34: }
35:
36: /**
37: * Construct an IllegalExpressionException with the given message.
38: *
39: * @param message a String containing the text of the exception message
40: */
41: public IllegalExpressionException(String message) {
42: super (message);
43: }
44:
45: /**
46: * Construct an IllegalExpressionException with the given cause
47: *
48: * @param cause a <code>Throwable<code> that caused this exception to be thrown
49: */
50: public IllegalExpressionException(Throwable cause) {
51: super (cause);
52: }
53:
54: /**
55: * Construct an IllegalExpressionException with the given <code>message</code> and <code>cause</code>.
56: *
57: * @param message a String containing the text of the exception message
58: * @param cause a <code>Throwable</code> that caused this exception to be thrown
59: */
60: public IllegalExpressionException(String message, Throwable cause) {
61: super (message, cause);
62: }
63:
64: /**
65: * Construct an IllegalExpressionException with the given <code>message</code> and the malformed expression.
66: *
67: * @param message a String containing the text of this exception message
68: * @param expression the expression that was malformed and caused this exception to be thrown
69: */
70: public IllegalExpressionException(String message, String expression) {
71: this (message);
72: this .expression = expression;
73: }
74:
75: /**
76: * Construct an IllegalExpressionException with the given <code>message</code>, the malformed expression, and the <code>cause</code>.
77: *
78: * @param message a String containing the text of this exception message
79: * @param expression the expression that was malformed and caused this exception to be thrown
80: * @param cause a <code>Throwable</code> that caused this exception to be thrown
81: */
82: public IllegalExpressionException(String message,
83: String expression, Throwable cause) {
84: this (message, cause);
85: this .expression = expression;
86: }
87:
88: /**
89: * Get the malformed expression.
90: *
91: * @return the malformed expression
92: */
93: public String getExpression() {
94: return expression;
95: }
96: }
|