< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Logging.Exceptions.WrapperException
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Logging/Exceptions/WrapperException.cs
Tag: Kestrun/Kestrun@0d738bf294e6281b936d031e1979d928007495ff
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 51
Line coverage: 100%
Branch coverage
100%
Covered branches: 4
Total branches: 4
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 08/26/2025 - 14:53:17 Line coverage: 22.2% (2/9) Branch coverage: 0% (0/4) Total lines: 51 Tag: Kestrun/Kestrun@78d1e497d8ba989d121b57aa39aa3c6b22de743112/15/2025 - 04:25:23 Line coverage: 100% (9/9) Branch coverage: 100% (4/4) Total lines: 51 Tag: Kestrun/Kestrun@e333660af9731cab5ae4c14a12f3bb84a8fabc7d 08/26/2025 - 14:53:17 Line coverage: 22.2% (2/9) Branch coverage: 0% (0/4) Total lines: 51 Tag: Kestrun/Kestrun@78d1e497d8ba989d121b57aa39aa3c6b22de743112/15/2025 - 04:25:23 Line coverage: 100% (9/9) Branch coverage: 100% (4/4) Total lines: 51 Tag: Kestrun/Kestrun@e333660af9731cab5ae4c14a12f3bb84a8fabc7d

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_ErrorRecordWrapper()100%11100%
.ctor(...)100%11100%
.ctor(...)100%11100%
.ctor(...)100%11100%
.ctor()100%11100%
ToString()100%44100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Logging/Exceptions/WrapperException.cs

#LineLine coverage
 1using System.Management.Automation;
 2using Kestrun.Logging.Data;
 3
 4namespace Kestrun.Logging.Exceptions;
 5
 6/// <summary>
 7/// Represents an exception that wraps another exception and optionally an ErrorRecord.
 8/// </summary>
 9public class WrapperException : Exception
 10{
 11    /// <summary>
 12    /// Gets the wrapped <see cref="ErrorRecordWrapper"/> associated with this exception, if any.
 13    /// </summary>
 1014    public ErrorRecordWrapper? ErrorRecordWrapper { get; }
 15
 16    /// <summary>
 17    /// Initializes a new instance of the <see cref="WrapperException"/> class with a specified error message.
 18    /// </summary>
 19    /// <param name="message">The error message that explains the reason for the exception.</param>
 420    public WrapperException(string message) : base(message)
 21    {
 422    }
 23
 24    /// <summary>
 25    /// Initializes a new instance of the <see cref="WrapperException"/> class with a specified error message and a refe
 26    /// </summary>
 27    /// <param name="message">The error message that explains the reason for the exception.</param>
 28    /// <param name="innerException">The exception that is the cause of the current exception.</param>
 1029    public WrapperException(string message, Exception innerException) : base(message, innerException)
 30    {
 1031    }
 32
 33    /// <summary>
 34    /// Initializes a new instance of the <see cref="WrapperException"/> class with a specified inner exception and an <
 35    /// </summary>
 36    /// <param name="innerException">The exception that is the cause of the current exception.</param>
 37    /// <param name="errorRecord">The <see cref="ErrorRecord"/> associated with this exception.</param>
 438    public WrapperException(Exception innerException, ErrorRecord errorRecord) : base(string.Empty, innerException) => E
 39
 40    /// <summary>
 41    /// Initializes a new instance of the <see cref="WrapperException"/> class.
 42    /// </summary>
 143    public WrapperException()
 44    {
 145    }
 46
 47    /// <summary>
 48    /// Returns a string representation of the inner exception, or an empty string if none exists.
 49    /// </summary>
 450    public override string ToString() => InnerException?.ToString() ?? string.Empty;
 51}