Mercurial Hosting > luan
view 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 |
line wrap: on
line source
package luan.modules.lucene.queryparser; public final class ParseException extends Exception { public final String text; public final int errorIndex; public final int highIndex; public ParseException(SaneQueryParser qp) { this(qp,"Invalid input"); } public ParseException(SaneQueryParser qp,String msg) { super(msg+" at position "+(qp.parser.errorIndex()+1)); Parser parser = qp.parser; this.text = parser.text; this.errorIndex = parser.errorIndex(); this.highIndex = parser.highIndex(); } public ParseException(SaneQueryParser qp,Exception cause) { this(qp,cause.getMessage(),cause); } public ParseException(SaneQueryParser qp,String msg,Exception cause) { super(msg+" at position "+(qp.parser.errorIndex()+1),cause); Parser parser = qp.parser; this.text = parser.text; this.errorIndex = parser.errorIndex(); this.highIndex = parser.highIndex(); } }