use of com.yahoo.searchdefinition.parser.TokenMgrError in project vespa by vespa-engine.
the class SearchBuilder method importString.
private String importString(String str, String searchDefDir, DeployLogger deployLogger) throws ParseException {
Search search;
SimpleCharStream stream = new SimpleCharStream(str);
try {
search = new SDParser(stream, deployLogger, app, rankProfileRegistry).search(docTypeMgr, searchDefDir);
} catch (TokenMgrError e) {
throw new ParseException("Unknown symbol: " + e.getMessage());
} catch (ParseException pe) {
throw new ParseException(stream.formatException(Exceptions.toMessageString(pe)));
}
return importRawSearch(search);
}
Aggregations