Commit 6acac1d5 authored by Jérome Perrin's avatar Jérome Perrin

Raise constraint_definition text along with ConstraintNotFound


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10270 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ab2b8cbc
...@@ -924,7 +924,7 @@ def initializeProduct( context, ...@@ -924,7 +924,7 @@ def initializeProduct( context,
constructors = c.constructors, constructors = c.constructors,
icon = icon) icon = icon)
class ConstraintNotFound(Exception): class ConstraintNotFound(Exception):
pass pass
def createConstraintList(property_holder, constraint_definition): def createConstraintList(property_holder, constraint_definition):
...@@ -939,7 +939,7 @@ def createConstraintList(property_holder, constraint_definition): ...@@ -939,7 +939,7 @@ def createConstraintList(property_holder, constraint_definition):
except AttributeError: except AttributeError:
LOG("ERP5Type", PROBLEM, "Can not find Constraint: %s" % \ LOG("ERP5Type", PROBLEM, "Can not find Constraint: %s" % \
constraint_definition['type']) constraint_definition['type'])
raise ConstraintNotFound raise ConstraintNotFound(repr(constraint_definition))
consistency_instance = consistency_class(**constraint_definition) consistency_instance = consistency_class(**constraint_definition)
property_holder.constraints += [consistency_instance] property_holder.constraints += [consistency_instance]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment