Log thrown exception from test immediately. Fixes: #870