try package:incipit-core

Similar to catch, but returns an Either result which is (Right a) if no exception of type e was thrown, or (Left ex) if an exception of type e was thrown and its value is ex.
Run an IO via Embed and catch all exceptions, returning Either.
Run an IO via Embed and catch and ignore all exceptions.
Run an IO via Embed and catch exceptions of type e, returning Either.
Run an IO via Embed and catch exceptions of type e, returning Either. Unlike all other combinators, this doesn't convert the exception to Text.
Run an IO via Embed and catch IOError, returning Either.
Run an IO via Embed and catch IOError, returning Maybe.
Run an IO via Embed and catch and ignore IOError.
Run an IO via Embed and catch exceptions of type e, returning Maybe.
Run an IO via Embed and catch and ignore exceptions of type e.
Run an IO via Embed and catch all exceptions, returning Maybe.
A variant of try that takes an exception predicate to select which exceptions are caught (c.f. catchJust). If the exception does not match the predicate, it is re-thrown.