提交 c44f20a2 authored 作者: Frederic Bastien's avatar Frederic Bastien

generate a better error.

上级 e155e9ac
......@@ -467,7 +467,11 @@ class Function(object):
if arg is None:
s.storage[0] = arg
else:
s.storage[0] = s.type.filter(arg, strict=s.strict)
try:
s.storage[0] = s.type.filter(arg, strict=s.strict)
except Exception, e:
e.args = tuple(list(e.args)+["Bad input argument at index %d"%(list(args).index(arg))])
raise
s.provided += 1
i+=1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论