MESException.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Core.Mes.Client.Comm
  6. {
  7. /// <summary>
  8. /// MES自定义异常
  9. /// </summary>
  10. public class MESException : Exception
  11. {
  12. private int exceptionCode = -1;
  13. /// <summary>
  14. /// 异常码
  15. /// </summary>
  16. public int ExceptionCode
  17. {
  18. get { return exceptionCode; }
  19. set { exceptionCode = value; }
  20. }
  21. private string exceptionInfo = "";
  22. /// <summary>
  23. /// 异常描述
  24. /// </summary>
  25. public string ExceptionInfo
  26. {
  27. get { return exceptionInfo; }
  28. set { exceptionInfo = value; }
  29. }
  30. /// <summary>
  31. /// 构造函数
  32. /// </summary>
  33. public MESException()
  34. {
  35. }
  36. /// <summary>
  37. /// 构造函数
  38. /// </summary>
  39. /// <param name="message">异常消息</param>
  40. public MESException(string message) : base(message)
  41. {
  42. }
  43. /// <summary>
  44. /// 构造函数
  45. /// </summary>
  46. /// <param name="message">异常消息</param>
  47. /// <param name="exceptionCode">异常码</param>
  48. /// <param name="exceptionInfo">异常描述</param>
  49. public MESException(string message, int exceptionCode, string exceptionInfo) : base(message)
  50. {
  51. this.ExceptionCode = exceptionCode;
  52. this.ExceptionInfo = exceptionInfo;
  53. }
  54. }
  55. }