summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-01-09 17:39:04 +0100
committerGeorg Brandl <georg@python.org>2013-01-09 17:39:04 +0100
commit9cdab25fc7905262bebf562b4dccd30d8daf6747 (patch)
treed8aa065d633584d22d6c73fc592994bec6df43fc /pygments
parent18d17ac70b43edbdaa397704532349287f03ae1c (diff)
downloadpygments-git-9cdab25fc7905262bebf562b4dccd30d8daf6747.tar.gz
RobotFramework lexer: fix two instances of "return ValueError" instead of "raise ValueError".
Diffstat (limited to 'pygments')
-rw-r--r--pygments/lexers/_robotframeworklexer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/_robotframeworklexer.py b/pygments/lexers/_robotframeworklexer.py
index 64d832f3..b32dbde2 100644
--- a/pygments/lexers/_robotframeworklexer.py
+++ b/pygments/lexers/_robotframeworklexer.py
@@ -495,12 +495,12 @@ class VariableSplitter:
def _find_variable(self, string):
max_end_index = string.rfind('}')
if max_end_index == -1:
- return ValueError('No variable end found')
+ raise ValueError('No variable end found')
if self._is_escaped(string, max_end_index):
return self._find_variable(string[:max_end_index])
start_index = self._find_start_index(string, 1, max_end_index)
if start_index == -1:
- return ValueError('No variable start found')
+ raise ValueError('No variable start found')
return start_index, max_end_index
def _find_start_index(self, string, start, end):