Adds VM test that verifies that exceptions are caught