Hi guys! This PR adds one useful method to re-throw an exception wrapped as Left into an F where a MonadThrow is available.
I'm not sure about the naming, I'd like to continue using "raise" instead of "throw" but I named it "rethrow" because it's also present into EitherT.
Other alternatives that came to mind are:
getOrRaise ( overload of the existent method )
getOrReRaise
Example
val result: Try[Int] = Try(new RuntimeException("BOOM!").asLeft[Int]).getOrRethrow
Hi guys! This PR adds one useful method to re-throw an exception wrapped as
Left
into anF
where aMonadThrow
is available.I'm not sure about the naming, I'd like to continue using "raise" instead of "throw" but I named it "rethrow" because it's also present into
EitherT
. Other alternatives that came to mind are:Example