PLCExceptions.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. using System;
  2. #if NET_FULL
  3. using System.Runtime.Serialization;
  4. #endif
  5. namespace S7.Net
  6. {
  7. public class WrongNumberOfBytesException : Exception
  8. {
  9. public WrongNumberOfBytesException() : base()
  10. {
  11. }
  12. public WrongNumberOfBytesException(string message) : base(message)
  13. {
  14. }
  15. public WrongNumberOfBytesException(string message, Exception innerException) : base(message, innerException)
  16. {
  17. }
  18. #if NET_FULL
  19. protected WrongNumberOfBytesException(SerializationInfo info, StreamingContext context) : base(info, context)
  20. {
  21. }
  22. #endif
  23. }
  24. public class InvalidAddressException : Exception
  25. {
  26. public InvalidAddressException() : base ()
  27. {
  28. }
  29. public InvalidAddressException(string message) : base(message)
  30. {
  31. }
  32. public InvalidAddressException(string message, Exception innerException) : base(message, innerException)
  33. {
  34. }
  35. #if NET_FULL
  36. protected InvalidAddressException(SerializationInfo info, StreamingContext context) : base(info, context)
  37. {
  38. }
  39. #endif
  40. }
  41. public class InvalidVariableTypeException : Exception
  42. {
  43. public InvalidVariableTypeException() : base()
  44. {
  45. }
  46. public InvalidVariableTypeException(string message) : base(message)
  47. {
  48. }
  49. public InvalidVariableTypeException(string message, Exception innerException) : base(message, innerException)
  50. {
  51. }
  52. #if NET_FULL
  53. protected InvalidVariableTypeException(SerializationInfo info, StreamingContext context) : base(info, context)
  54. {
  55. }
  56. #endif
  57. }
  58. public class TPKTInvalidException : Exception
  59. {
  60. public TPKTInvalidException() : base()
  61. {
  62. }
  63. public TPKTInvalidException(string message) : base(message)
  64. {
  65. }
  66. public TPKTInvalidException(string message, Exception innerException) : base(message, innerException)
  67. {
  68. }
  69. #if NET_FULL
  70. protected TPKTInvalidException(SerializationInfo info, StreamingContext context) : base(info, context)
  71. {
  72. }
  73. #endif
  74. }
  75. public class TPDUInvalidException : Exception
  76. {
  77. public TPDUInvalidException() : base()
  78. {
  79. }
  80. public TPDUInvalidException(string message) : base(message)
  81. {
  82. }
  83. public TPDUInvalidException(string message, Exception innerException) : base(message, innerException)
  84. {
  85. }
  86. #if NET_FULL
  87. protected TPDUInvalidException(SerializationInfo info, StreamingContext context) : base(info, context)
  88. {
  89. }
  90. #endif
  91. }
  92. }