PLCExceptions.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. using System;
  2. #if NET_FULL
  3. using System.Runtime.Serialization;
  4. #endif
  5. namespace snap7Enc
  6. {
  7. internal 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. internal 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. internal 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. internal 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. }