Refactor rescue_from and add exception to block