Merge "Misleading error message"
This commit is contained in:
commit
5149a4c802
|
@ -1761,7 +1761,7 @@ def literal_schema_consistency(literal, theories, theory=None):
|
|||
arity = schema.arity(literal.table.table)
|
||||
if arity is not None and len(literal.arguments) != arity:
|
||||
return [exception.PolicyException(
|
||||
"Literal {} contained {} arguments but only "
|
||||
"Literal {} contained {} arguments but exactly "
|
||||
"{} arguments are permitted".format(
|
||||
str(literal), len(literal.arguments), arity))]
|
||||
|
||||
|
|
|
@ -682,7 +682,7 @@ class TestCompiler(base.TestCase):
|
|||
# wrong number of arguments
|
||||
check_err('p(x) :- q(x), mod1:p(x,y,z,w), r(x)',
|
||||
'mod3',
|
||||
'only 3 arguments are permitted',
|
||||
'exactly 3 arguments are permitted',
|
||||
'Wrong number of arguments for rule')
|
||||
|
||||
# same tests for an atom
|
||||
|
@ -702,7 +702,7 @@ class TestCompiler(base.TestCase):
|
|||
# wrong number of arguments
|
||||
check_err('p(1, 2, 3, 4)',
|
||||
'mod1',
|
||||
'only 3 arguments are permitted',
|
||||
'exactly 3 arguments are permitted',
|
||||
'Wrong number of arguments for atom',
|
||||
f=compile.fact_errors)
|
||||
|
||||
|
|
Loading…
Reference in New Issue