提交 ed634a9a authored 作者: Joseph Turian's avatar Joseph Turian

More descriptive error in scalar.filter

上级 b7c95b0b
...@@ -50,7 +50,7 @@ class Scalar(Type): ...@@ -50,7 +50,7 @@ class Scalar(Type):
try: try:
return py_type(data) return py_type(data)
except Exception, e: except Exception, e:
raise TypeError("Could not convert to %s" % self.dtype, e) raise TypeError("Could not convert %s (value=%s) to %s" % (type(data), data, self.dtype), e)
def __eq__(self, other): def __eq__(self, other):
return type(self) == type(other) and other.dtype == self.dtype return type(self) == type(other) and other.dtype == self.dtype
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论