- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2
 
Description
In error messages sometimes the term 'variable' is used, sometimes the term 'parameter'. In some cases both of them:
'Could not set variable '${keyP.${indexP}}' with value 'newvalue'! Reason: 'str' object does not support item assignment'
'The variable '${dictP}['0']' is not available!'
'Found expression '${dictP}' with at least one parameter of composite data type ('${dictP}' is of type <class 'dict'>). Because of this expression is the name of a parameter, only simple data types are allowed to be substituted inside.'
'Invalid index or dictionary key in parameter '${dictP}[${dictP}]'. The datatype of variable '${dictP}' have to 'int' or 'str'.'
'Invalid parameter format in line: "par${1}am2" : "123"'
'Invalid syntax: Found index or sub-element inside curly brackets in the parameter '${dictP[${dictP}]}''
'The implicit creation of data structures based on parameter is not supported. New parameter '0['0']' could not be created by the expression '${indexP}['${indexP}']''
Does this usage currently follow a certain rule? What is the difference between 'parameter' and 'variable'? In internet a lot of discussions about this question can be found; also definitions. Sometimes very academic.
Can we - in the context of the JsonPreprocessor - take over these definitions? Or in other words: Does it make sense for the JsonPreprocessor to distinguish between a variable and a parameter?
My personal feeling is that it's better to use only one of these terms.
And because of I feel really uncomfortable with this topic in general, I would try to avoid the term 'parameter' and 'variable' as much as possible ;-)
For example:
Instead of:
'Could not set variable '${keyP.${indexP}}' with value 'newvalue'! Reason: 'str' object does not support item assignment'
Better:
'str' object does not support item assignment' (expression: '${keyP.${indexP}}').
Instead of:
'Invalid index or dictionary key in parameter '${dictP}[${dictP}]'. The datatype of variable '${dictP}' have to 'int' or 'str'.'
Alternative version:
Key error: Dictionary keys have to be of type int or str (expression: '${dictP}[${dictP}]').
Instead of:
'Invalid syntax: Found index or sub-element inside curly brackets in the parameter '${dictP[${dictP}]}''
Alternative version:
'Invalid syntax: Found index or sub-element inside curly brackets (expression: '${dictP[${dictP}]}')'
Current version:
'The implicit creation of data structures based on parameter is not supported. New parameter '0['0']' could not be created by the expression '${indexP}['${indexP}']''
Alternative version:
The implicit creation of data structures based on parameters is not supported (expression: '${testdict.B}['${name}']').
See also #237
What do you think?
Metadata
Metadata
Assignees
Labels
Projects
Status