提交 5aa75e84 authored 作者: James Bergstra's avatar James Bergstra

Added exception information to scalar c_extract failure case

上级 68ddc68d
......@@ -148,7 +148,11 @@ class Scalar(Type):
specs = self.dtype_specs()
return """
if (!%(check)s(py_%(name)s))
{
PyErr_Format(PyExc_ValueError,
"Scalar check failed");
%(fail)s
}
%(name)s = (%(dtype)s)%(conv)s(py_%(name)s);
""" % dict(sub,
name = name,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论