A type class for principled error handling.
A type class for principled error handling.
ErrorControl
is designed to be a supplement to MonadError
with more precise typing.
It is defined as a relationship between an error-handling type F[A]
and a non-error-handling type G[A]
.
This means a value of F[A]
is able to produce either a value of A
or an error of type E
.
Unlike MonadError
's handleError
method, the controlError
function defined in this type class
will yield a value that free of any errors, since they've all been handled.
Must adhere to the laws defined in cats.laws.ErrorControlLaws.
(Since version 1.0.0-RC1) renamed to Semigroupal