mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Nicer error message when search query string is too long
This commit is contained in:
parent
32944ef443
commit
ace82b046f
@ -212,7 +212,10 @@ class SearchQueryParser(object):
|
||||
# another search.
|
||||
def _parse(self, query, candidates=None):
|
||||
self.recurse_level += 1
|
||||
try:
|
||||
res = self._parser.parseString(query)[0]
|
||||
except RuntimeError:
|
||||
raise ParseException('Failed to parse query, recursion limit reached: %r'%query)
|
||||
if candidates is None:
|
||||
candidates = self.universal_set()
|
||||
t = self.evaluate(res, candidates)
|
||||
|
Loading…
x
Reference in New Issue
Block a user