提交 1e2b244d authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Clearer exception message

Switched order of exception arguments to first say that there is a bad input in some position, before explaining why it is bad.
上级 c0b4926a
......@@ -537,7 +537,8 @@ class Function(object):
if self.name:
function_name += 'with name "'+self.name+'" '
#end if
e.args = tuple(list(e.args)+["Bad input argument to "+function_name+" at index %d" % i])
e.args = tuple(["Bad input argument to " + function_name +
" at index %d" % i] + list(e.args))
raise
#end except
#end if
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论