Note: unlike the Control.Monad.Trans.State.StateT monad transformer from
the transformers library, the State effect doesn't discard state updates
when an exception is received:
Example1 expression
>>> import qualified Control.Monad.Trans.State.Strict as S
Example1 expression
>>> :{ (`S.execStateT` "Hi") . handle (\(_::ErrorCall) -> pure ()) $ do S.modify (++ " there!") error "oops":}"Hi"