Test unhandled exception
Commit 7fc023e8 fixed issue #64, and made unhandled exceptions work correctly. This patch adds a test to tst-except.cc to test this - that an unhandled exception really does call the custom termination handler that the C++ standard allows to set (before the above commit, this test would hang). Unfortunately, gcc's libsupc++ tries very hard to ensure that the terminination handler really does abort - if the handler returns, or throws an exception, the library nevertheless aborts. So we need to trick it with an ugly longjmp to make this test be able to complete without aborting the system. Signed-off-by:Nadav Har'El <nyh@cloudius-systems.com>
Loading
Please register or sign in to comment