Calls received and catches any exceptions thrown by it. Succeeds if it doesn't catch TExpected or a sub-type. Throws a FailingExpectationError otherwise.
There are three possible outcomes:
- received throws a TExpected or one of its sub-types. A FailingExpectationError is thrown.
- received doesn't throw a TExpected, but does throw something else. The expectation passes and the throwable that was caught is ignored.
- received doesn't throw anything. The expectation passes.
See Implementation
Calls received and catches any exceptions thrown by it. Succeeds if it doesn't catch TExpected or a sub-type. Throws a FailingExpectationError otherwise.
There are three possible outcomes:
- received throws a TExpected or one of its sub-types. A FailingExpectationError is thrown.
- received doesn't throw a TExpected, but does throw something else. The expectation passes and the throwable that was caught is ignored.
- received doesn't throw anything. The expectation passes.