Alternative error handling for try/except fix #4208 #4210 #3075#4211
Alternative error handling for try/except fix #4208 #4210 #3075#4211d-biehl wants to merge 3 commits intorobotframework:masterfrom d-biehl:alternative-fix-#4208-#4210-#3075
Conversation
|
Using invalid number of parameters with Because it's unlikely these are common errors and because they are already now detected by the parser, I don't consider it too high priority to detect them earlier. I understand it's a bit better for editors to be able to highlight only the latter value in cases like instead of highlighting the whole where the problem is that a token is missing. I would assume it would be easier for editors to just check does the |
Referring to your comment #4209 (comment)
I tried to move the error handling for TRY/EXCEPT/ELSE/FINALLY/END into the lexer, so that errors are detected and reported as early as possible.
At the moment it is implemented in a way that the invalid tokens are reported but have no effect at runtime, similar for example if a library is not found. And I haven't corrected or created any tests yet.
In a similar way IF/WHILE/FOR could be adapted, but this should be done in separate PR's.