Provide a description for syntax error

Before this change, 'None' was reported without additional information
Now the reason of error and expression, where it's occurred reported successfully

Change-Id: I1615319957ed0ebf89375eefa75798112cb28563
Partly-Closes-Bug: #1342403
This commit is contained in:
Ekaterina Fedorova 2014-08-27 15:12:10 +04:00 committed by Ekaterina Chernova
parent d6a3a2b2e6
commit c335fe6cb8

View File

@ -108,5 +108,6 @@ def parse_expression(expr):
continue
if result is None:
raise SyntaxError()
raise SyntaxError(
'Syntax is incorrect in expression: {0}'.format(expr))
return result