Releases: kolan72/PoliNorError
Releases · kolan72/PoliNorError
2.16.21
2.16.20
Improvements
- Introduce the
TryCatch
class, which implements theITryCatch
interface with methods for executing sync or async, generic or non-generic delegates that returnTryCatchResult(<T>)
class (no more than twoCatchBlockHandler
supported so far). - Introduce the
ITryCatchBuilder
interface andTryCatchBuilder
class. - Add
NonEmptyCatchBlockFilter.ToCatchBlockHandler
andCatchBlockForAllHandler.ToTryCatch
methods. - Add
ToTryCatchBuilder
andToTryCatch
extension methods to theCatchBlockFilteredHandler
class.
Small changes
- Add CODE_COVERAGE.md.
Docs changes
- Update 'Calling Func and Action delegates in a resilient manner' README Chapter.
2.16.16
2.16.15
Improvements
- Introduce the
CatchBlockHandler
class and theCatchBlockFilteredHandler
andCatchBlockForAllHandler
subclasses. - Introduce new
InvokeWithSimple(Async)
extension methods with aCatchBlockHandler
parameter for non-generic delegates. - Introduce new
InvokeWithSimple(Async)<T>
extension methods with aCatchBlockHandler
parameter for generic delegates. - Introduce the
NonEmptyCatchBlockFilter
class. - Add the
RetryProcessingErrorInfo
andRetryProcessingErrorContext
classes to process exceptions by a retry processor in a more object-oriented way.
Small changes
- Add
CatchBlockFilter.Empty()
static method. - Upgrade tests to NUnit.4.1.0.
Docs changes
- Update 'Calling Func and Action delegates in a resilient manner' README Chapter.
- Update 'SimplePolicy' README Chapter.
2.16.9
Improvements
- Add
CatchBlockFilter
class and use it in theSimplePolicyProcessor
class. - Introduce new
Action.InvokeWithSimple
extension method with anCatchBlockFilter
parameter. - Introduce new
Func<CancellationToken, Task>.InvokeWithSimpleAsync
extension method with anCatchBlockFilter
parameter. - Introduce new
Func<T>.InvokeWithSimple
extension method with anCatchBlockFilter
parameter. - Introduce new
Func<CancellationToken, Task<T>>.InvokeWithSimpleAsync<T>
extension methods with anCatchBlockFilter
parameter. - Delegates, when included as part of
PolicyDelegate
in a collection, are handled error-free even if a policy rethrows an exception. - Set the
PolicyResult.ErrorFilterUnsatisfied
property totrue
when a delegate is handled as part of aPolicyDelegate
by thePolicyDelegateCollection(T)
and an exception is rethrown because the error filter is not satisfied. - Force the non-generic async fallback delegate converted from
Func<Task>
to throwOperationCanceledException
if cancellation has already occurred.
Small changes
- Rename the incorrect filename PolicyProcessorTests.cs to ExceptionFilterTests.cs.
2.16.1
Improvements
- Introduce
IncludeInnerError<TInnerException>
andExcludeInnerError<TInnerException>
methods forPolicyCollection
. - Introduce
IncludeInnerError<TInnerException>
andExcludeInnerError<TInnerException>
methods for thePolicyDelegateCollection
andPolicyDelegateCollection<T>
classes. - Introduce
FallbackFuncsProvider
class. - New constructors for
FallbackPolicy
classes that accept theFallbackFuncsProvider
parameter. - Introduce
PolicyCollection.WithFallback(FallbackFuncsProvider)
method. - Add
PolicyCollection.WithFallback
overloaded methods withonlyGenericFallbackForGenericDelegate
parameter. - Refactor the constructors of
FallbackPolicy
classes to accept the newonlyGenericFallbackForGenericDelegate
parameter. - Improved performance for
FallbackPolicy
, since no moreExpression
s are used to store generic fallback functions. - Made
SimplePolicyProcessor
andSimplePolicy
rethrow exception if error filter is unsatisfied. - Minimize the number of calls to the
Expression.Compile
method in thePolicyProcessor.ExceptionFilter
class. - Introduce
PolicyResult.FailedHandlerIndex
property.
Bug fixes
- Fix issue #93.
Small changes
- Made
SimplePolicyProcessor
class sealed.
Docs changes
- Update 'Error processors' README Chapter.
- Add doc comments to
IBulkErrorProcessor
,IFallbackProcessor
interfaces andFallbackPolicy
class.
2.15.0
Improvements
- Introduce
SetPolicyResultFailedIf(<T>)
methods for thePolicyCollection
and thePolicyDelegateCollection(<T>)
classes. - Introduce
IncludeInnerError<TInnerException>
andExcludeInnerError<TInnerException>
methods for policy processors and library policies(RetryPolicy
,SimplePolicy
andFallbackPolicy
). - Cross-synchronisation support for invoking a non-generic fallback delegate when a generic one is not set.
Small changes
- Reduce allocations by using only a single instance of the
RetryErrorContext
class in Retry processing. - Add
Apply<T>
extension method toAction<T>
delegate. - Refactor
FallbackPolicyBase
class.
Docs changes
- Correct the doc comments for the
SetPolicyResultFailedIfInner
methods of the library policies. - Update 'PolicyResult handlers' README Chapter.
2.14.0
Improvements
- Introduce
WithInnerErrorProcessorOf<TException>
overloaded methods for policy processor interfaces,BulkErrorProcessor
, library policies(RetryPolicy
,SimplePolicy
andFallbackPolicy
),PolicyDelegateCollection(<T>)
andPolicyCollection
. - Introduce
SetPolicyResultFailedIf(<T>)
methods for library policies(RetryPolicy
,SimplePolicy
andFallbackPolicy
).
2.12.1
Improvements
- Introduce
IncludeErrorSet<TException1, TException2>
andExcludeErrorSet<TException1, TException2>
extension methods for thePolicyDelegateCollection(<T>)
classes. - Introduce
PolicyResult(<T>).CriticalError
property. - Introduce
PolicyResultHandlingException.HandlerIndex
property.
Bug fixes
- Fix issue (#83): the
PolicyResult
handler index in the collection should be correct when adding generic and non generic handlers consecutively.
Small changes
- Upgrade tests to Nunit 4.0.1.
Docs changes
- Update 'Error filters' README Chapter.
- Edit 'PolicyResult handlers' README Chapter.
- Edit 'PolicyDelegateCollection' README Chapter.
- Correct 'Policy wrap' README Chapter example.
2.11.1
Improvements
- Introduce
IncludeErrorSet<TException1, TException2
> methods for policy processors, library policies(RetryPolicy
,SimplePolicy
andFallbackPolicy
) andPolicyCollection
. - Introduce
ExcludeErrorSet<TException1, TException2
> methods for policy processors, library policies(RetryPolicy
,SimplePolicy
andFallbackPolicy
) andPolicyCollection
.
Small changes
- Slightly improve performance by using the equality operator instead of the
Equals
method for comparing types in generic error filters.
Docs changes
- Add new 'PolicyDelegateCollectionResult' README chapter.
- Update examples in the 'Policy wrap' README chapter.
- Add docs for the
ExcludeError
,IncludeError
extension methods in theRetryProcessorErrorFiltering
,FallbackProcessorErrorFiltering
,SimplePolicyProcessorErrorFiltering
classes.