Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use assing, not variable, with FOR and TRY/EXCEPT model objects when referring to assigned variables #4708

Closed
@Snooz82

Description

@Snooz82

FOR

After tokenising the assigned variable is of type VARIABLE with FOR loops but shall be ASSIGN:

Example:

FOR     ${i}    IN RANGE   10       # ${i} is:  token.type == "VARIABLE"
   Log    ${i}
END

Here is an assignment happening as in:

${i}    Set Variable     1

Therefore VARIABLE would be considered "wrong" here.

TRY/EXCEPT

Similar situation is with EXCEPT AS variables. they are also VARIABLE

Example:

TRY
    Fail     failure message
EXCEPT     AS    ${error}     # ${error} is:  token.type == "VARIABLE"
   Log     my error ${error}
END

Should also be ASSIGN after the AS

Cheers

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions