It seems like the issue is related to code using identical lambdas.
Both GLibMainLoopTest, propagates_exception_from_server_action and GLibMainLoopTest.can_be_rerun_after_exception (test_glib_main_loop.cpp) use the same definition:
And when a definition is identical, the exception handler is not called for some reason. It seems as if the compiler registers the wrong info in the exception handler table.
Using a different message for the runtime_error exception in the lambda forces the compiler to produce a different implementation and the exception is then able to be caught as expected.
It seems like the issue is related to code using identical lambdas.
Both GLibMainLoopTest, propagates_ exception_ from_server_ action and GLibMainLoopTes t.can_be_ rerun_after_ exception (test_glib_ main_loop. cpp) use the same definition:
ml. enqueue( this, [] { throw std::runtime_ error(" server action error"); });
And when a definition is identical, the exception handler is not called for some reason. It seems as if the compiler registers the wrong info in the exception handler table.
Using a different message for the runtime_error exception in the lambda forces the compiler to produce a different implementation and the exception is then able to be caught as expected.