Skip to content

Commit 72954ea

Browse files
committed
elaborated assert msg in BuiltinFunctionRootNode
1 parent 92fefeb commit 72954ea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/function/BuiltinFunctionRootNode.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,19 @@ public Object execute(VirtualFrame frame) {
268268
} else {
269269
PythonBuiltinBaseNode node = factory.createNode();
270270
if (node instanceof PythonUnaryBuiltinNode) {
271-
assert argumentsList.length == 1 : "mismatch in number of arguments for " + node.getClass().getName();
271+
assert argumentsList.length == 1 : "mismatch in number of arguments for " + node.getClass().getName() + ", expected 1, got " + argumentsList.length;
272272
newBody = new BuiltinUnaryCallNode((PythonUnaryBuiltinNode) node, argumentsList[0]);
273273
} else if (node instanceof PythonBinaryBuiltinNode) {
274-
assert argumentsList.length == 2 : "mismatch in number of arguments for " + node.getClass().getName();
274+
assert argumentsList.length == 2 : "mismatch in number of arguments for " + node.getClass().getName() + ", expected 2, got " + argumentsList.length;
275275
newBody = new BuiltinBinaryCallNode((PythonBinaryBuiltinNode) node, argumentsList[0], argumentsList[1]);
276276
} else if (node instanceof PythonTernaryBuiltinNode) {
277-
assert argumentsList.length == 3 : "mismatch in number of arguments for " + node.getClass().getName();
277+
assert argumentsList.length == 3 : "mismatch in number of arguments for " + node.getClass().getName() + ", expected 3, got " + argumentsList.length;
278278
newBody = new BuiltinTernaryCallNode((PythonTernaryBuiltinNode) node, argumentsList[0], argumentsList[1], argumentsList[2]);
279279
} else if (node instanceof PythonQuaternaryBuiltinNode) {
280-
assert argumentsList.length == 4 : "mismatch in number of arguments for " + node.getClass().getName();
280+
assert argumentsList.length == 4 : "mismatch in number of arguments for " + node.getClass().getName() + ", expected 4, got " + argumentsList.length;
281281
newBody = new BuiltinQuaternaryCallNode((PythonQuaternaryBuiltinNode) node, argumentsList[0], argumentsList[1], argumentsList[2], argumentsList[3]);
282282
} else if (node instanceof PythonVarargsBuiltinNode) {
283-
assert argumentsList.length == 3 : "mismatch in number of arguments for " + node.getClass().getName();
283+
assert argumentsList.length == 3 : "mismatch in number of arguments for " + node.getClass().getName() + ", expected 3, got " + argumentsList.length;
284284
assert argumentsList[0] != null && argumentsList[1] != null && argumentsList[2] != null;
285285
newBody = new BuiltinVarArgsCallNode((PythonVarargsBuiltinNode) node, argumentsList[0], argumentsList[1], argumentsList[2]);
286286
} else {

0 commit comments

Comments
 (0)