Exception handling modifications

Unexpected exceptions are now caught, to be able to continue test
running. If an excepted exception is not thrown, we consider this as
an assertion failure.