Misleading error message
Minor fix in error message to make it more understandable. Depends-On: I34d1a392d4539ede01666002cfa301c21f9cd4bd Change-Id: I3b92259fc80b8654050b5141f38fe764f7912319 Closes-Bug: #1756792
This commit is contained in:
parent
5c7d690902
commit
78c2937e22
|
@ -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