Skip to content
Snippets Groups Projects
Commit 01576ce6 authored by Nadav Har'El's avatar Nadav Har'El
Browse files

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: default avatarNadav Har'El <nyh@cloudius-systems.com>
parent ae5b31b8
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment