ceb97de1f353d2b39de3502522ea996544187c12
[cql-java-moved-to-github.git] / src / main / java / org / z3950 / zing / cql / CQLParseException.java
1 // $Id: CQLParseException.java,v 1.2 2002-11-06 20:13:45 mike Exp $
2
3 package org.z3950.zing.cql;
4
5
6 /**
7  * Exception indicating that an error ocurred parsing CQL.
8  *
9  * @version     $Id: CQLParseException.java,v 1.2 2002-11-06 20:13:45 mike Exp $
10  */
11 public class CQLParseException extends Exception {
12     private int pos;
13     /**
14      * Creates a new <TT>CQLParseException</TT>.
15      * @param s
16      *  An error message describing the problem with the query,
17      *  usually a syntax error of some kind.
18      */
19     public CQLParseException(String s, int pos) {
20         super(s);
21         this.pos = pos;
22     }
23     
24     /**
25      * Character position of the parsing error.
26      * @return 
27      */
28     public int getPosition() {
29       return pos;
30     }
31 }
32