Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to compare exceptions #50

Closed
kyleconroy opened this issue Apr 20, 2016 · 3 comments · Fixed by #77
Closed

No way to compare exceptions #50

kyleconroy opened this issue Apr 20, 2016 · 3 comments · Fixed by #77

Comments

@kyleconroy
Copy link

kyleconroy commented Apr 20, 2016

If the control path and the candidate both raise an exception, there isn't a way to compare them today. The comparison is currently hardcoded here. Would there be any interest in accepting a patch that added the equivalent* method to experiments?

science "widget-permissions" do |e|
  e.use { raise "Foo" }
  e.try { raise "Bar" }

  # Only called when both paths raise an exception
  e.equivalent do |control_exp, candidate_exp|
    # Ignore the message contents
    control_exp.class == candidate_exp
  end
end
  • I'm not set on the name, please suggest anything better.
@jbarnette
Copy link
Contributor

Kinda related to #67, in that the interfaces for ignoring and comparing changes are probably all at the wrong level right now.

@cdwort
Copy link
Contributor

cdwort commented Dec 8, 2017

@jbarnette We're running into this exact issue. Would you consider a PR that would add support for a configurable error_compare in addition to compare?

@jbarnette
Copy link
Contributor

@cdwort For sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants