cleveland: Allow catching exceptions in nettests
Clarification and motivation
It would be useful (for example in !638 (merged)) if NettestFailure
s could be caught and handled with a function like
catch :: MonadNettest caps base m => m a -> (NettestFailure -> m a) -> m a
See !638 (comment 446286363) and the following comments for some initial discussion.
Acceptance criteria
- The
NettestFailure
s can be specified in a high-level way. Conversions to untypedExpression
s are handled by smart constructors, for example. - Optional: Existing tests that use
expectFailure
continue to work without requiring modification. - Add a test for #302 (closed) that can reproduce the bug when the fix is reverted.