Re: [C++-sig] unfriendly python error message (no line number)

2009-11-08 Thread amohr
> No, it is not about template-related error messages :-)... > > I am wrapping a class: > Obviously, the error is that I forgot '()' in the second get(). I > am > getting this error message: > > 0 > > > > Is there a way to give user a more friendly error message in such > case, > with at le

[C++-sig] unfriendly python error message (no line number)

2009-11-08 Thread Thomas Daniel
No, it is not about template-related error messages :-)... I am wrapping a class: #include struct X { X() : _x(0) {} int get() const { return _x; } int _x; }; BOOST_PYTHON_MODULE(Test) { class_("X") .def("get", &X::get) ; } and testing it with python: x = X(); print x.ge