Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle C++ exceptions properly #26

Closed
alexhroom opened this issue Sep 4, 2024 · 2 comments
Closed

Handle C++ exceptions properly #26

alexhroom opened this issue Sep 4, 2024 · 2 comments

Comments

@alexhroom
Copy link
Collaborator

Currently workarounds are used (e.g. see the EditControls command) to handle crashes while C++ is handling Python code. These exceptions should be handled properly and the workarounds removed.

@StephenNneji
Copy link
Contributor

I had a quick look at this issue, and it should be possible to catch an exception in a command by default, what we cannot do is propagate the exception, as exceptions in slots have undefined behaviour in QT (https://doc.qt.io/qtforpython-6/overviews/exceptionsafety.html#signals-and-slots), but I am adding a function to log the exceptions in #37

So It might be better to leave EditControls as it is because we will have to store and retrieve the exception from the command as it cannot be propagated

@alexhroom
Copy link
Collaborator Author

closing, then as exceptions are now properly logged but cannot be properly solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants