TarException.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System;
  2. using System.Runtime.Serialization;
  3. using System.Net.ApiService.Compression.Exceptions;
  4. namespace System.Net.ApiService.Compression.Tar
  5. {
  6. /// <summary>
  7. /// TarException represents exceptions specific to Tar classes and code.
  8. /// </summary>
  9. [Serializable]
  10. public class TarException : SharpZipBaseException
  11. {
  12. /// <summary>
  13. /// Initialise a new instance of <see cref="TarException" />.
  14. /// </summary>
  15. public TarException()
  16. {
  17. }
  18. /// <summary>
  19. /// Initialise a new instance of <see cref="TarException" /> with its message string.
  20. /// </summary>
  21. /// <param name="message">A <see cref="string"/> that describes the error.</param>
  22. public TarException(string message)
  23. : base(message)
  24. {
  25. }
  26. /// <summary>
  27. /// Initialise a new instance of <see cref="TarException" />.
  28. /// </summary>
  29. /// <param name="message">A <see cref="string"/> that describes the error.</param>
  30. /// <param name="innerException">The <see cref="Exception"/> that caused this exception.</param>
  31. public TarException(string message, Exception innerException)
  32. : base(message, innerException)
  33. {
  34. }
  35. /// <summary>
  36. /// Initializes a new instance of the TarException class with serialized data.
  37. /// </summary>
  38. /// <param name="info">
  39. /// The System.Runtime.Serialization.SerializationInfo that holds the serialized
  40. /// object data about the exception being thrown.
  41. /// </param>
  42. /// <param name="context">
  43. /// The System.Runtime.Serialization.StreamingContext that contains contextual information
  44. /// about the source or destination.
  45. /// </param>
  46. protected TarException(SerializationInfo info, StreamingContext context)
  47. : base(info, context)
  48. {
  49. }
  50. }
  51. }