Sitelet https://web.archive.org/web/20201226184859/https://github.com/github/scientist/issues/50
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

Open
kyleconroy opened this issue Apr 20, 2016 · 3 comments
Open

No way to compare exceptions #50

kyleconroy opened this issue Apr 20, 2016 · 3 comments

Comments

@kyleconroy
Copy link

@kyleconroy 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

@jbarnette jbarnette commented Aug 10, 2017

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

@cdwort 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

@jbarnette jbarnette commented Dec 8, 2017

@cdwort For sure!

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.