Skip to content

Commit

Permalink
Catch any exceptions, not only ECONNREFUSED
Browse files Browse the repository at this point in the history
  • Loading branch information
dv committed Jul 3, 2012
1 parent 34c1698 commit 807a993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/split/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def finished(experiment_name, options = {:reset => true})
alternative.increment_completion
session[:split].delete(experiment_name) if options[:reset]
end
rescue Errno::ECONNREFUSED => e
rescue => e
raise unless Split.configuration.db_failover
Split.configuration.db_failover_on_db_error.call(e)
end
Expand Down Expand Up @@ -115,7 +115,7 @@ def experiment_variable(alternatives, control, experiment_name)
end
end
end
rescue Errno::ECONNREFUSED => e
rescue => e
raise unless Split.configuration.db_failover
Split.configuration.db_failover_on_db_error.call(e)
ret = control_variable(control)
Expand Down

0 comments on commit 807a993

Please sign in to comment.