< Summary

Information
Class: Elsa.AI.Persistence.EFCore.Helpers.ExceptionFilters
Assembly: Elsa.AI.Persistence.EFCore
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.AI.Persistence.EFCore/Helpers/ExceptionFilters.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 12
Line coverage: 100%
Branch coverage
50%
Covered branches: 6
Total branches: 12
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
IsNonFatal(...)50%22100%
IsFatal(...)50%1010100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.AI.Persistence.EFCore/Helpers/ExceptionFilters.cs

#LineLine coverage
 1namespace Elsa.AI.Persistence.EFCore.Helpers;
 2
 3internal static class ExceptionFilters
 4{
 15    public static bool IsNonFatal(Exception exception) => !IsFatal(exception) && exception is not OperationCanceledExcep
 6
 7    private static bool IsFatal(Exception exception) =>
 18        exception is OutOfMemoryException and not InsufficientMemoryException
 19        || exception is StackOverflowException
 110        || exception is AccessViolationException
 111        || exception.InnerException is not null && IsFatal(exception.InnerException);
 12}