< Summary

Information
Class: System.Net.Http.HttpIOException
Assembly: System.Net.Http
File(s): D:\runner\runtime\src\libraries\System.Net.Http\src\System\Net\Http\HttpIOException.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 33
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

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

File(s)

D:\runner\runtime\src\libraries\System.Net.Http\src\System\Net\Http\HttpIOException.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.IO;
 5
 6namespace System.Net.Http
 7{
 8    /// <summary>
 9    /// An exception thrown when an error occurs while reading the response.
 10    /// </summary>
 11    public class HttpIOException : IOException
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="HttpIOException"/> class.
 15        /// </summary>
 16        /// <param name="httpRequestError">The <see cref="Http.HttpRequestError"/> that caused the exception.</param>
 17        /// <param name="message">The message string describing the error.</param>
 18        /// <param name="innerException">The exception that is the cause of the current exception.</param>
 19        public HttpIOException(HttpRequestError httpRequestError, string? message = null, Exception? innerException = nu
 020            : base(message, innerException)
 021        {
 022            HttpRequestError = httpRequestError;
 023        }
 24
 25        /// <summary>
 26        /// Gets the <see cref="Http.HttpRequestError"/> that caused the exception.
 27        /// </summary>
 028        public HttpRequestError HttpRequestError { get; }
 29
 30        /// <inheritdoc />
 031        public override string Message => $"{base.Message} ({HttpRequestError})";
 32    }
 33}