Important: Please read the Qt Code of Conduct -

Exception handling

  • I have been working with pyside for a while now and am very happy with the result ... however there is one thing that takes a lot of time: finding bugs when Qt (C++) throws an exception. This basically leads to a program crash with no indication of what went wrong. Sometimes i just go back to an earlier version and restart.

    Does anyone know of an initiative to translate C++ exceptions in Qt to Python exceptions? This would be a huge help and remove one of the weakest points in Pyside (in my humble opinion).

  • Qt doesn't throw exceptions. Qt usually asserts when something can go really wrong. Can't catch termination caused by failing asserts, as far as I know. The program is probably in an invalid state, so it's a good thing it's being brought down.

    What's the specific code situation where this happens?

  • No problem with it being brought down, just want to be able to hunt down the errors somewhat quickly, e.g. via an exception call-stack and message, not by stepping through/into code untill something goes wrong.

    Currently i have an occasional crash on start-up; when i find the code where it happens, i am as far as i would have been with a call_stack and could probably solve the error quickly enough.

Log in to reply