sigslot icon indicating copy to clipboard operation
sigslot copied to clipboard

Ignore exceptions thrown from multiple signals

Open Sylvyrfysh opened this issue 3 years ago • 1 comments

Since signals do not allow for returning values from calls, it logically follows that we should not let exceptions bubble up. If we do allow exceptions to bubble up, we stop execution of every slot that follows, as well as potentially exposing the emitting code to an exception it is unprepared to handle.

Sylvyrfysh avatar Aug 09 '22 02:08 Sylvyrfysh

I am on the fence over this one. On one hand event based programming is hardly compatible with exceptions, so adding this try catch block makes sense, On the other hand It bothers me hide the fact that an exception has been silenced. I would argue that users know that exceptions thrown in callbacks cannot be caught and should take the necessary measures to prevent it.

palacaze avatar Sep 05 '22 15:09 palacaze