stop if an exception occurs other than KeyError