[schema] properly raise BadSchemaDefinition
authorLaura Médioni <laura.medioni@logilab.fr>
Fri, 29 Aug 2014 07:44:13 +0200
changeset 9957 5def1d98fce7
parent 9956 19a683a0047c
child 9958 3b755c9057fd
[schema] properly raise BadSchemaDefinition when some expression mains variables may not be guessed
schema.py
--- a/schema.py	Thu Aug 28 18:29:14 2014 +0200
+++ b/schema.py	Fri Aug 29 07:44:13 2014 +0200
@@ -125,7 +125,8 @@
     if 'U' in defined:
         mainvars.add('U')
     if not mainvars:
-        raise Exception('unable to guess selection variables')
+        raise BadSchemaDefinition('unable to guess selection variables in %r'
+                                  % expression)
     return mainvars
 
 def split_expression(rqlstring):