< Summary

Information
Class: Elsa.Common.Helpers.ExceptionExtensions
Assembly: Elsa.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Helpers/ExceptionExtensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 16
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 6
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
IsFatal(...)0%4260%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Helpers/ExceptionExtensions.cs

#LineLine coverage
 1namespace Elsa.Common.Helpers;
 2
 3/// <summary>
 4/// Extension methods for <see cref="Exception"/>.
 5/// </summary>
 6public static class ExceptionExtensions
 7{
 8    /// <summary>
 9    /// Returns <c>true</c> for exceptions that represent unrecoverable process-level failures
 10    /// and should never be caught and swallowed.
 11    /// </summary>
 12    public static bool IsFatal(this Exception exception) =>
 013        exception is OutOfMemoryException
 014            or BadImageFormatException
 015            or InvalidProgramException;
 16}

Methods/Properties

IsFatal(System.Exception)