Remove catch-all rescue

Handle exceptions as early as possible and rescue more specific
exceptions.