Improve error message on function argument type mismatch#2813
Improve error message on function argument type mismatch#2813nafraf wants to merge 33 commits intoRedisGraph:masterfrom
Conversation
|
Cool! As for operators, I think a message such as may be confusing for the user because s/he didn't call any function. A better message may be |
Codecov ReportBase: 90.06% // Head: 90.07% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2813 +/- ##
=======================================
Coverage 90.06% 90.07%
=======================================
Files 270 270
Lines 26153 26176 +23
=======================================
+ Hits 23556 23577 +21
- Misses 2597 2599 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Hi, What is the expected message for this case? operator or any other? |
|
I think the following error message would be clear:
Can we please change the order, so 'Null' would always be the last?
This makes me think again about your previous question regarding binary operators: Instead of
It would be better to have a similar error as well:
Also for unary operators:
|
|
OK, changes were implemented:
|
This PR implements #2802
A new function
Error_FunctionArgumentSITypeMismatch()was implemented, and additionally to SIValue received and expected type (used in functionError_SITypeMismatch()) it receives function name, argument number and element number.The function
AR_HAS_LABELS()was modified to validate all the input arguments before start to iterate the labels.These are some examples of the new error messages:
I'm not sure if arithmetic operators, should be considered as an special case: