catch package:distributed-process
Deprecated: Use Control.Monad.Catch.catch instead
Catches
ProcessExitException. The handler will not be applied
unless its type matches the encoded data stored in the exception (see
the
reason argument given to the
exit primitive). If the
handler cannot be applied, the exception will be re-thrown.
To handle
ProcessExitException without regard for
reason, see
catch. To handle multiple
reasons of
differing types, see
catchesExit.
Lift
catches (almost).
As
ProcessExitException stores the exit
reason as a
typed, encoded message, a handler must accept inputs of the expected
type. In order to handle a list of potentially different handlers (and
therefore input types), a handler passed to
catchesExit must
accept
Message and return
Maybe (i.e.,
Just p
if it handled the exit reason, otherwise
Nothing).
See
maybeHandleMessage and
Message for more details.