LJException.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace JLHHJSvr.LJException
  7. {
  8. public class LJException : Exception
  9. {
  10. public LJException(string msg)
  11. : base(msg)
  12. {
  13. }
  14. #if !DEBUG
  15. // 非debug版本不返回堆栈
  16. public override string ToString()
  17. {
  18. return Message;
  19. }
  20. #endif
  21. }
  22. public class LJCommonException : LJException
  23. {
  24. public LJCommonException(string message)
  25. : base(message)
  26. {
  27. }
  28. }
  29. public class LJNetworkException : LJException
  30. {
  31. public LJNetworkException(string message)
  32. : base(message)
  33. {
  34. }
  35. }
  36. public class LJSearchResultNotFoundException : LJException
  37. {
  38. public LJSearchResultNotFoundException(string msg)
  39. : base(string.Format("未查找到[{0}]的相关记录", msg))
  40. {
  41. }
  42. }
  43. public class PriceHelperException : LJException
  44. {
  45. public PriceHelperException(string message)
  46. : base(message)
  47. {
  48. }
  49. }
  50. public class PBExpressionHelperException : LJException
  51. {
  52. public PBExpressionHelperException(string message)
  53. : base(message)
  54. {
  55. }
  56. }
  57. public class LJPowerMissingExeption : LJException
  58. {
  59. public LJPowerMissingExeption(string message)
  60. : base(message)
  61. {
  62. }
  63. }
  64. }