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

Add orElseRaise syntax for ApplicativeError #2689

Merged
merged 3 commits into from
Mar 29, 2020
Merged

Add orElseRaise syntax for ApplicativeError #2689

merged 3 commits into from
Mar 29, 2020

Conversation

kubukoz
Copy link
Member

@kubukoz kubukoz commented Jan 7, 2019

No description provided.

@codecov-io
Copy link

codecov-io commented Jan 7, 2019

Codecov Report

Merging #2689 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2689   +/-   ##
=======================================
  Coverage   93.33%   93.33%           
=======================================
  Files         378      378           
  Lines        7723     7724    +1     
  Branches      218      219    +1     
=======================================
+ Hits         7208     7209    +1     
  Misses        515      515           
Flag Coverage Δ
#scala_version_212 93.38% <100.00%> (+<0.01%) ⬆️
#scala_version_213 93.11% <100.00%> (+<0.01%) ⬆️
Impacted Files Coverage Δ
.../src/main/scala/cats/syntax/applicativeError.scala 77.77% <100.00%> (+1.30%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c494157...d0bed2b. Read the comment docs.

@kailuowang kailuowang added this to the 1.6 milestone Jan 8, 2019
@ceedubs
Copy link
Contributor

ceedubs commented Jan 8, 2019

Thanks, @kubukoz. Would you mind adding an sbt-doctest example for this? That would help motivate it and would also probably help with the code coverage drop.

@kailuowang
Copy link
Contributor

This is a nit:
This method seems closer to adaptError to me, except that it ignores the original error.
orElse is usually associated with recovering. We don't have adaptError in ApplicativeError but we probably should (at least in the syntax) related issue is #2685
I have a proposal there. maybe we call this one adaptErrorTo or orRaise?
I also agree that we can use at least a doctest.

@kailuowang kailuowang modified the milestones: 1.6.0-RC1, 1.7 Jan 22, 2019
@kailuowang kailuowang removed this from the 1.7 milestone Feb 27, 2019
@kubukoz
Copy link
Member Author

kubukoz commented Apr 26, 2019

I'm back on it. orRaise sounds good to me!

@kubukoz
Copy link
Member Author

kubukoz commented Mar 27, 2020

@kailuowang can we get this to the finish line? :)

Copy link
Contributor

@kailuowang kailuowang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. sorry about the delay.

@LukaJCB LukaJCB merged commit 97dbfeb into typelevel:master Mar 29, 2020
@kubukoz kubukoz deleted the add-orElseRaise branch March 29, 2020 18:56
@travisbrown travisbrown added this to the 2.2.0-M1 milestone Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants