Improve error reporting for callback exceptions
Closes #678 (closed)
This is a sister MR to the cppTango!1441 (merged)
By experimenting with callbacks, I found out, that cppTango, actually, does a nice print of failure, if we do not touch it at all, since, compared to boost, pybind11 automatically repacks Python errors into std::exception.
The only story is, that cppTango can be improved a bit for better readability, and then it looks like:
Mon May 19 14:45:07 2025: Tango::ZmqEventConsumer::push_zmq_event() got exception:
RuntimeError: Test error
At:
/home/matveyev/pytango/sandbox/server_for_tests.py(11): cb
/home/matveyev/pytango/tango/utils.py(2491): trace_wrapper
/home/matveyev/pytango/tango/green.py(100): submit
/home/matveyev/pytango/tango/green.py(242): greener
in callback method of: tango://haso102ym.desy.de:10000/device/test/1/attr.idl5_change
and I like it more, due to cppTango also prints for which event we got exception
And we also uncomment test_async_exception_in_callback due to cppTango was fixed
Edited by Yury Matveev