This is an automated email from the ASF dual-hosted git repository.

mboehm7 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/main by this push:
     new 98fded23bb [MINOR] Error handling wrong named function arguments
98fded23bb is described below

commit 98fded23bbdce7274f2abbbed9f78d21f43ae9c5
Author: Matthias Boehm <[email protected]>
AuthorDate: Thu Mar 28 17:51:22 2024 +0100

    [MINOR] Error handling wrong named function arguments
    
    This patch modifies the error handling to also show the function
    signature, avoiding that users have to find and read the docs for
    minor errors like misspelled max_iter parameters.
---
 src/main/java/org/apache/sysds/parser/FunctionCallIdentifier.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sysds/parser/FunctionCallIdentifier.java 
b/src/main/java/org/apache/sysds/parser/FunctionCallIdentifier.java
index 3c74e0e6c1..401cdb3ad9 100644
--- a/src/main/java/org/apache/sysds/parser/FunctionCallIdentifier.java
+++ b/src/main/java/org/apache/sysds/parser/FunctionCallIdentifier.java
@@ -160,7 +160,8 @@ public class FunctionCallIdentifier extends DataIdentifier
                        for( ParameterExpression paramExpr : _paramExprs )
                                if(!params.contains(paramExpr.getName()))
                                        raiseValidateError("Named function call 
parameter '"+paramExpr.getName()+"'"
-                                               + " does not exist in signature 
of function '"+fstmt.getName()+"'.");
+                                               + " does not exist in signature 
of function '"+fstmt.getName()+"'. "
+                                               + "Function signature: 
"+Arrays.toString(fstmt.getInputParamNames()));
                }
                
                // Step 7: constant propagation into function call statement

Reply via email to