HttpException.cs 750 B

12345678910111213141516171819202122232425262728293031323334
  1. // <author></author>
  2. // <date></date>
  3. // <description></description>
  4. using System.Net;
  5. namespace ERP.Framework.Exceptions
  6. {
  7. /// <summary>
  8. /// Http异常类
  9. /// </summary>
  10. public class HttpException : Exception
  11. {
  12. /// <summary>
  13. /// Http状态码
  14. /// </summary>
  15. public HttpStatusCode HttpCode { get; set; }
  16. /// <summary>
  17. /// 通用状态码
  18. /// </summary>
  19. public int Code { get; set; }
  20. /// <summary>
  21. /// 构造函数
  22. /// </summary>
  23. /// <param name="code"></param>
  24. /// <param name="message"></param>
  25. public HttpException(int code, string message) : base(message)
  26. {
  27. Code = code;
  28. }
  29. }
  30. }