Bug fix where an exception could leave the exit handler still registered
Bug fix where an exception could leave the exit handler still registered

GerHobbelt/simpletest,GerHobbelt/simpletest,GerHobbelt/simpletest