It should not be an exception if the error filter throws.
kolan72 opened this issue · comments
This test failed with an error throwing.
[Test]
public void Should_Throw_In_ErrorFilter_Be_Handled()
{
var simplePolicy = new SimplePolicy();
bool testFn(Exception _) => throw new Exception("Filter exception");
var fbWithError = simplePolicy.ExcludeError((Func<Exception, bool>)testFn);
void action() => throw new Exception("Test");
var res = fbWithError.Handle(action);
Assert.IsTrue(res.ErrorFilterUnsatisfied);
}