ProtoException.cs 1.0 KB

123456789101112131415161718192021222324252627282930
  1. using System;
  2. #if PLAT_BINARYFORMATTER && !(WINRT || PHONE8 || COREFX)
  3. using System.Runtime.Serialization;
  4. #endif
  5. namespace ProtoBuf
  6. {
  7. /// <summary>
  8. /// Indicates an error during serialization/deserialization of a proto stream.
  9. /// </summary>
  10. #if PLAT_BINARYFORMATTER && !(WINRT || PHONE8 || COREFX)
  11. [Serializable]
  12. #endif
  13. public class ProtoException : Exception
  14. {
  15. /// <summary>Creates a new ProtoException instance.</summary>
  16. public ProtoException() { }
  17. /// <summary>Creates a new ProtoException instance.</summary>
  18. public ProtoException(string message) : base(message) { }
  19. /// <summary>Creates a new ProtoException instance.</summary>
  20. public ProtoException(string message, Exception innerException) : base(message, innerException) { }
  21. #if PLAT_BINARYFORMATTER && !(WINRT || PHONE8 || COREFX)
  22. /// <summary>Creates a new ProtoException instance.</summary>
  23. protected ProtoException(SerializationInfo info, StreamingContext context) : base(info, context) { }
  24. #endif
  25. }
  26. }