Allow QueryParseException to escape ChangeQueryRewriter

ChangeIndex.getSource throws QueryParseException with the intention of
allowing implementations to not support certain operators/features
(e.g. regex queries). For this to result in a user-visible error
message instead of a 500, we need to not wrap it in an
IllegalStateException.

Change-Id: I8871df8b806cb48ba976ce00f5864a906cd3e9b3
This commit is contained in:
Dave Borowitz
2013-08-22 11:41:28 -07:00
parent 74f574324d
commit 5b2c024975
3 changed files with 15 additions and 18 deletions

View File

@@ -327,7 +327,8 @@ public class IndexRewriteTest extends TestCase {
return queryBuilder.parse(query);
}
private Predicate<ChangeData> rewrite(Predicate<ChangeData> in) {
private Predicate<ChangeData> rewrite(Predicate<ChangeData> in)
throws QueryParseException {
return rewrite.rewrite(in);
}