01: /*
02: * Copyright 2007 Gerd Ziegler (www.gerdziegler.de)
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: * http://www.apache.org/licenses/LICENSE-2.0
07: * Unless required by applicable law or agreed to in writing,
08: * software distributed under the License is distributed on an
09: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
10: * either express or implied. See the License for the specific
11: * language governing permissions and limitations under the License.
12: * @author www.gerdziegler.de
13: */
14: package org.ztemplates.actions.expression;
15:
16: public class ZParserException extends Exception {
17: public ZParserException(String expression, int pos, String expected) {
18: super ("expected '" + expected + "' at position " + pos + " '"
19: + expression + "' near '" + expression.substring(pos)
20: + "'");
21: }
22:
23: public ZParserException(String expression, String error) {
24: super (error + " '" + expression + "'");
25: }
26: }
|