Raise more appropriate error on missing kwarg value
This commit is contained in:
parent
0c73f78ed0
commit
4138c660cc
@ -459,8 +459,9 @@ class HyASTCompiler(object):
|
||||
try:
|
||||
value = next(exprs_iter)
|
||||
except StopIteration:
|
||||
msg = "Keyword argument {kw} needs a value"
|
||||
raise HyCompileError(msg.format(kw=str(expr)))
|
||||
raise HyTypeError(expr,
|
||||
"Keyword argument {kw} needs "
|
||||
"a value.".format(kw=str(expr)))
|
||||
|
||||
compiled_value = self.compile(value)
|
||||
ret += compiled_value
|
||||
|
Loading…
Reference in New Issue
Block a user