rescue exceptions and retry