kolan72 / PoliNorError

PoliNorError is a library that provides error handling capabilities through Retry and Fallback policies. The library has a specific focus on handling potential exceptions within the catch block and offers various configuration options.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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);
}