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 CanHandleError #116

Closed
kevin-lee opened this issue Aug 30, 2020 · 0 comments · Fixed by #117
Closed

Add CanHandleError #116

kevin-lee opened this issue Aug 30, 2020 · 0 comments · Fixed by #117
Assignees
Labels
task Task v1 Effectie v1
Milestone

Comments

@kevin-lee
Copy link
Owner

Task

Summary

Add CanHandleError[F[_]]

Project Details

Version: 1.2.0

Description

Add CanHandleError[F[_]] to handle NonFatal errors with error handle from Throwable to F[AA] where AA >: A.

trait CanHandleError[F[_]] {

  type Xor[A, B]
  type XorT[A, B]

  def handleNonFatalWith[A, AA >: A](fa: => F[A])(handleError: Throwable => F[AA]): F[AA]

  def handleEitherTNonFatalWith[A, AA >: A, B, BB >: B](
      efab: => XorT[A, B]
    )(
      handleError: Throwable => F[Xor[AA, BB]]
    ): XorT[AA, BB]

  def handleNonFatal[A, AA >: A](fa: => F[A])(handleError: Throwable => AA): F[AA]

  def handleEitherTNonFatal[A, AA >: A, B, BB >: B](
      efab: => XorT[A, B]
    )(
      handleError: Throwable => Xor[AA, BB]
    ): XorT[AA, BB]

}
@kevin-lee kevin-lee added the task Task label Aug 30, 2020
@kevin-lee kevin-lee added this to the milestone8 milestone Aug 30, 2020
@kevin-lee kevin-lee self-assigned this Aug 30, 2020
kevin-lee added a commit that referenced this issue Aug 30, 2020
kevin-lee added a commit that referenced this issue Aug 30, 2020
@kevin-lee kevin-lee added the v1 Effectie v1 label Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Task v1 Effectie v1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant