Skip to content

Commit 343a54a

Browse files
committed
handle invalid regular expressions in embedded keywords
1 parent fadb76d commit 343a54a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ All notable changes to the "robotcode" extension will be documented in this file
99
- optimize restart language clients if configuration changed
1010
- support for progress feature of language server protocol
1111
- correct WHILE snippets
12+
- handle invalid regular expressions in embedded keywords
1213

1314
## 0.11.6
1415

robotcode/language_server/robotframework/diagnostics/library_doc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@
8585

8686

8787
def is_embedded_keyword(name: str) -> bool:
88-
from robot.errors import VariableError
88+
from robot.errors import DataError, VariableError
8989
from robot.running.arguments.embedded import EmbeddedArguments
9090

9191
try:
9292
if EmbeddedArguments(name):
9393
return True
94-
except VariableError:
94+
except (VariableError, DataError):
9595
return True
9696

9797
return False
@@ -114,13 +114,13 @@ def normalized_name(self) -> str:
114114

115115
@property
116116
def embedded_arguments(self) -> Any:
117-
from robot.errors import VariableError
117+
from robot.errors import DataError, VariableError
118118
from robot.running.arguments.embedded import EmbeddedArguments
119119

120120
if self._embedded_arguments is None:
121121
try:
122122
self._embedded_arguments = EmbeddedArguments(self.name)
123-
except VariableError:
123+
except (VariableError, DataError):
124124
self._embedded_arguments = ()
125125

126126
return self._embedded_arguments

0 commit comments

Comments
 (0)