ZipException.cs 3.3 KB

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