< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 25
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor()100%110%
.ctor(...)100%110%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/Common/src/System/Net/InternalException.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4using System.Diagnostics;
 5
 6namespace System.Net
 7{
 8    internal sealed class InternalException : Exception
 9    {
 10        private readonly object? _unexpectedValue;
 11
 012        internal InternalException() : this(null) { }
 13
 014        internal InternalException(object? unexpectedValue)
 015        {
 016            Debug.Fail($"InternalException thrown for unexpected value: {unexpectedValue}");
 17            _unexpectedValue = unexpectedValue;
 18        }
 19
 020        public override string Message => _unexpectedValue != null ?
 021            base.Message + " " + _unexpectedValue :
 022            base.Message;
 23    }
 24}
 25