2022-02-03 15:26:44 +00:00
|
|
|
|
namespace ASC.Common.Web;
|
|
|
|
|
|
|
|
|
|
public class HttpException : Exception
|
2019-06-07 09:15:17 +00:00
|
|
|
|
{
|
2022-02-03 15:26:44 +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)
|
|
|
|
|
{
|
2022-02-03 15:26:44 +00:00
|
|
|
|
StatusCode = (int)httpStatusCode;
|
2022-02-08 11:07:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|