Mercurial Hosting > luan
comparison src/luan/modules/lucene/queryparser/ParseException.java @ 775:1a68fc55a80c
simplify dir structure
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 26 Aug 2016 14:36:40 -0600 |
parents | lucene/src/luan/modules/lucene/queryparser/ParseException.java@01e68da6983b |
children |
comparison
equal
deleted
inserted
replaced
774:3e30cf310e56 | 775:1a68fc55a80c |
---|---|
1 package luan.modules.lucene.queryparser; | |
2 | |
3 | |
4 public final class ParseException extends Exception { | |
5 public final String text; | |
6 public final int errorIndex; | |
7 public final int highIndex; | |
8 | |
9 public ParseException(SaneQueryParser qp) { | |
10 this(qp,"Invalid input"); | |
11 } | |
12 | |
13 public ParseException(SaneQueryParser qp,String msg) { | |
14 super(msg+" at position "+(qp.parser.errorIndex()+1)); | |
15 Parser parser = qp.parser; | |
16 this.text = parser.text; | |
17 this.errorIndex = parser.errorIndex(); | |
18 this.highIndex = parser.highIndex(); | |
19 } | |
20 | |
21 public ParseException(SaneQueryParser qp,Exception cause) { | |
22 this(qp,cause.getMessage(),cause); | |
23 } | |
24 | |
25 public ParseException(SaneQueryParser qp,String msg,Exception cause) { | |
26 super(msg+" at position "+(qp.parser.errorIndex()+1),cause); | |
27 Parser parser = qp.parser; | |
28 this.text = parser.text; | |
29 this.errorIndex = parser.errorIndex(); | |
30 this.highIndex = parser.highIndex(); | |
31 } | |
32 | |
33 } |