DocSpace-buildtools/common/ASC.Common/Web/HttpException.cs

36 lines
936 B
C#
Raw Normal View History

namespace ASC.Common.Web;
public class HttpException : Exception
2019-06-07 09:15:17 +00:00
{
public int StatusCode { get; }
2019-06-07 09:15:17 +00:00
2022-02-08 11:07:28 +00:00
public HttpException(int httpStatusCode)
{
StatusCode = httpStatusCode;
}
2019-06-07 09:15:17 +00:00
2022-02-08 11:07:28 +00:00
public HttpException(HttpStatusCode httpStatusCode)
{
StatusCode = (int)httpStatusCode;
}
2019-06-07 09:15:17 +00:00
2022-02-08 11:07:28 +00:00
public HttpException(int httpStatusCode, string message) : base(message)
{
StatusCode = httpStatusCode;
}
2019-06-07 09:15:17 +00:00
2022-02-08 11:07:28 +00:00
public HttpException(HttpStatusCode httpStatusCode, string message) : base(message)
{
StatusCode = (int)httpStatusCode;
}
2019-06-07 09:15:17 +00:00
2022-02-08 11:07:28 +00:00
public HttpException(int httpStatusCode, string message, Exception inner) : base(message, inner)
{
StatusCode = httpStatusCode;
}
2019-06-07 09:15:17 +00:00
2022-02-08 11:07:28 +00:00
public HttpException(HttpStatusCode httpStatusCode, string message, Exception inner) : base(message, inner)
{
StatusCode = (int)httpStatusCode;
2022-02-08 11:07:28 +00:00
}
}