01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: ExpressionNotBooleanException.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.template.exceptions;
09:
10: public class ExpressionNotBooleanException extends ProcessingException {
11: private static final long serialVersionUID = -37462186995432114L;
12:
13: private String mLanguage = null;
14: private String mTemplateName = null;
15: private String mExpression = null;
16: private Class mType = null;
17:
18: public ExpressionNotBooleanException(String language,
19: String templateName, String expression, Class type) {
20: super ("The " + language + " expression [[ " + expression
21: + " ]] in template '" + templateName
22: + "' returns a value of type '" + type
23: + "', while it should return a boolean.");
24:
25: mLanguage = language;
26: mTemplateName = templateName;
27: mExpression = expression;
28: mType = type;
29: }
30:
31: public String getLanguage() {
32: return mLanguage;
33: }
34:
35: public String getTemplateName() {
36: return mTemplateName;
37: }
38:
39: public String getExpression() {
40: return mExpression;
41: }
42:
43: public Class getType() {
44: return mType;
45: }
46: }
|