changeset 3825:df0218925ef8

search query parser: if query parsing raises a BracketError, at least tell what the problem is (and not just raise empty ValueError)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 03 Jul 2008 20:49:52 +0200
parents dcd932f8c4ec
children 3cbb709f5c5d
files MoinMoin/search/queryparser.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/queryparser.py	Thu Jul 03 15:24:35 2008 +0200
+++ b/MoinMoin/search/queryparser.py	Thu Jul 03 20:49:52 2008 +0200
@@ -1054,8 +1054,8 @@
                                                         brackets=('()', ),
                                                         quotes='\'"')
             logging.debug("parse_quoted_separated items: %r" % items)
-        except wikiutil.BracketError:
-            raise ValueError()
+        except wikiutil.BracketError, err:
+            raise ValueError(str(err))
         query = self._analyse_items(items)
         logging.debug("analyse_items query: %r" % query)
         return query