- rescue Exception => e
- if try < max_retry_count && (error_matcher.nil? || e.message =~ error_matcher)
- sleep retry_wait_interval_secs
- retry
- else
- raise
- end
+ rescue StandardError => e
+ raise unless try < max_retry_count && (error_matcher.nil? || e.message =~ error_matcher)
+ sleep retry_wait_interval_secs
+ retry