pyenet icon indicating copy to clipboard operation
pyenet copied to clipboard

Callbacks swallow exceptions

Open NotAFile opened this issue 6 years ago • 2 comments

during the creation of https://github.com/piqueserver/piqueserver/pull/361, I noticed that the enet callbacks swallow any exceptions in python space silently.

NotAFile avatar Jul 29 '18 16:07 NotAFile

Not really sure what we can do about that. Have you considered having your callback function schedule the code in your mainloop outside of the callback?

aresch avatar Jul 30 '18 03:07 aresch

Well, we have added a try except around it in our code. It's just a gotcha that you need that in the first place. Cython docs describe adding a try except around the code in Cython, but I have not tested if this fixes things.

NotAFile avatar Jul 30 '18 11:07 NotAFile