[ms] catch exception on executing rql, work-around #1356884 until a proper fix
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 22 Oct 2010 17:40:23 +0200
changeset 6599 d3008cb6d1c3
parent 6598 78eaccfbd2b7
child 6600 3829498510a7
[ms] catch exception on executing rql, work-around #1356884 until a proper fix
web/facet.py
--- a/web/facet.py	Fri Oct 22 17:38:47 2010 +0200
+++ b/web/facet.py	Fri Oct 22 17:40:23 2010 +0200
@@ -711,7 +711,13 @@
         rql = 'Any %s LIMIT 1 WHERE NOT %s %s %s, %s' % (
             self.filtered_variable.name, subj, self.rtype, obj,
             self.rqlst.where.as_string())
-        return bool(self.rqlexec(rql, self.cw_rset and self.cw_rset.args))
+        try:
+            return bool(self.rqlexec(rql, self.cw_rset and self.cw_rset.args))
+        except:
+            # catch exception on executing rql, work-around #1356884 until a
+            # proper fix
+            self.exception('cant handle rql generated by %s', self)
+            return False
 
     def _add_not_rel_restr(self, rel):
         nrrel = nodes.Not(_make_relation(self.rqlst, self.filtered_variable,