SharpZipBaseException.cs 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // SharpZipBaseException.cs
  2. //
  3. // Copyright 2004 John Reilly
  4. //
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9. //
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. //
  19. // Linking this library statically or dynamically with other modules is
  20. // making a combined work based on this library. Thus, the terms and
  21. // conditions of the GNU General Public License cover the whole
  22. // combination.
  23. //
  24. // As a special exception, the copyright holders of this library give you
  25. // permission to link this library with independent modules to produce an
  26. // executable, regardless of the license terms of these independent
  27. // modules, and to copy and distribute the resulting executable under
  28. // terms of your choice, provided that you also meet, for each linked
  29. // independent module, the terms and conditions of the license of that
  30. // module. An independent module is a module which is not derived from
  31. // or based on this library. If you modify this library, you may extend
  32. // this exception to your version of the library, but you are not
  33. // obligated to do so. If you do not wish to do so, delete this
  34. // exception statement from your version.
  35. using System;
  36. #if !NETCF_1_0 && !NETCF_2_0
  37. using System.Runtime.Serialization;
  38. #endif
  39. namespace CommonMPQ.SharpZipLib
  40. {
  41. /// <summary>
  42. /// SharpZipBaseException is the base exception class for the SharpZipLibrary.
  43. /// All library exceptions are derived from this.
  44. /// </summary>
  45. /// <remarks>NOTE: Not all exceptions thrown will be derived from this class.
  46. /// A variety of other exceptions are possible for example <see cref="ArgumentNullException"></see></remarks>
  47. #if !NETCF_1_0 && !NETCF_2_0
  48. [Serializable]
  49. #endif
  50. public class SharpZipBaseException : ApplicationException
  51. {
  52. #if !NETCF_1_0 && !NETCF_2_0
  53. /// <summary>
  54. /// Deserialization constructor
  55. /// </summary>
  56. /// <param name="info"><see cref="System.Runtime.Serialization.SerializationInfo"/> for this constructor</param>
  57. /// <param name="context"><see cref="StreamingContext"/> for this constructor</param>
  58. protected SharpZipBaseException(SerializationInfo info, StreamingContext context )
  59. : base( info, context )
  60. {
  61. }
  62. #endif
  63. /// <summary>
  64. /// Initializes a new instance of the SharpZipBaseException class.
  65. /// </summary>
  66. public SharpZipBaseException()
  67. {
  68. }
  69. /// <summary>
  70. /// Initializes a new instance of the SharpZipBaseException class with a specified error message.
  71. /// </summary>
  72. /// <param name="message">A message describing the exception.</param>
  73. public SharpZipBaseException(string message)
  74. : base(message)
  75. {
  76. }
  77. /// <summary>
  78. /// Initializes a new instance of the SharpZipBaseException class with a specified
  79. /// error message and a reference to the inner exception that is the cause of this exception.
  80. /// </summary>
  81. /// <param name="message">A message describing the exception.</param>
  82. /// <param name="innerException">The inner exception</param>
  83. public SharpZipBaseException(string message, Exception innerException)
  84. : base(message, innerException)
  85. {
  86. }
  87. }
  88. }