优化代码,处理编译警告
大石头 编写于 2023-03-18 21:51:50
X
using System.Net;

namespace NewLife.Http;

public class HttpRequestException : Exception
{
    public HttpStatusCode? StatusCode { get; }

    public HttpRequestException()
        : base(null, null)
    {
    }

    public HttpRequestException(String message)
        : base(message, null)
    {
    }

    public HttpRequestException(String message, Exception inner, HttpStatusCode? statusCode)
        : base(message, inner) => StatusCode = statusCode;
}