Skip to content

Commit

Permalink
Override onError for IOAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed Aug 26, 2024
1 parent 868451b commit c6026b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/shared/src/main/scala/cats/effect/IO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1995,6 +1995,9 @@ object IO extends IOCompanionPlatform with IOLowPriorityImplicits with TuplePara
override def handleError[A](fa: IO[A])(f: Throwable => A): IO[A] =
fa.handleError(f)

override def onError[A](fa: IO[A])(pf: PartialFunction[Throwable, IO[Unit]]): IO[A] =
fa.onError(pf)

override def timeout[A](fa: IO[A], duration: FiniteDuration)(
implicit ev: TimeoutException <:< Throwable): IO[A] = {
fa.timeout(duration)
Expand Down

0 comments on commit c6026b3

Please sign in to comment.