Skip to content

Commit

Permalink
MID-7664: Display reason for failure of parsing query in SearchEvaluator
Browse files Browse the repository at this point in the history
  • Loading branch information
tonydamage committed Feb 16, 2022
1 parent 30228d3 commit 9ff06f2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ public <T extends ObjectType> PipelineData evaluate(SearchExpressionType searchE
try {
unresolvedObjectQuery = context.getQueryConverter().createObjectQuery(objectClass, searchExpression.getQuery());
} catch (SchemaException e) {
throw new ScriptExecutionException("Couldn't parse object query due to schema exception", e);
throw new ScriptExecutionException("Couldn't parse object query. Reason: " + e.getMessage(), e);
}
} else if (searchExpression.getSearchFilter() != null) {
unresolvedObjectQuery = prismContext.queryFactory().createQuery();
try {
ObjectFilter filter = prismContext.getQueryConverter().parseFilter(searchExpression.getSearchFilter(), objectClass);
unresolvedObjectQuery.setFilter(filter);
} catch (SchemaException e) {
throw new ScriptExecutionException("Couldn't parse object filter due to schema exception", e);
throw new ScriptExecutionException("Couldn't parse object query. Reason: " + e.getMessage(), e);
}
}
ObjectQuery objectQuery;
Expand Down

0 comments on commit 9ff06f2

Please sign in to comment.