diff options
Diffstat (limited to '')
-rw-r--r-- | src/dtf/WixToolset.Dtf.Compression.Zip/ZipException.cs | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/dtf/WixToolset.Dtf.Compression.Zip/ZipException.cs b/src/dtf/WixToolset.Dtf.Compression.Zip/ZipException.cs new file mode 100644 index 00000000..50fd6156 --- /dev/null +++ b/src/dtf/WixToolset.Dtf.Compression.Zip/ZipException.cs | |||
@@ -0,0 +1,60 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Dtf.Compression.Zip | ||
4 | { | ||
5 | using System; | ||
6 | using System.IO; | ||
7 | using System.Resources; | ||
8 | using System.Globalization; | ||
9 | using System.Runtime.Serialization; | ||
10 | |||
11 | /// <summary> | ||
12 | /// Exception class for zip operations. | ||
13 | /// </summary> | ||
14 | [Serializable] | ||
15 | public class ZipException : ArchiveException | ||
16 | { | ||
17 | /// <summary> | ||
18 | /// Creates a new ZipException with a specified error message and a reference to the | ||
19 | /// inner exception that is the cause of this exception. | ||
20 | /// </summary> | ||
21 | /// <param name="message">The message that describes the error.</param> | ||
22 | /// <param name="innerException">The exception that is the cause of the current exception. If the | ||
23 | /// innerException parameter is not a null reference (Nothing in Visual Basic), the current exception | ||
24 | /// is raised in a catch block that handles the inner exception.</param> | ||
25 | public ZipException(string message, Exception innerException) | ||
26 | : base(message, innerException) { } | ||
27 | |||
28 | /// <summary> | ||
29 | /// Creates a new ZipException with a specified error message. | ||
30 | /// </summary> | ||
31 | /// <param name="message">The message that describes the error.</param> | ||
32 | public ZipException(string message) | ||
33 | : this(message, null) { } | ||
34 | |||
35 | /// <summary> | ||
36 | /// Creates a new ZipException. | ||
37 | /// </summary> | ||
38 | public ZipException() | ||
39 | : this(null, null) { } | ||
40 | |||
41 | /// <summary> | ||
42 | /// Initializes a new instance of the ZipException class with serialized data. | ||
43 | /// </summary> | ||
44 | /// <param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param> | ||
45 | /// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param> | ||
46 | protected ZipException(SerializationInfo info, StreamingContext context) : base(info, context) | ||
47 | { | ||
48 | } | ||
49 | |||
50 | /// <summary> | ||
51 | /// Sets the SerializationInfo with information about the exception. | ||
52 | /// </summary> | ||
53 | /// <param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param> | ||
54 | /// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param> | ||
55 | public override void GetObjectData(SerializationInfo info, StreamingContext context) | ||
56 | { | ||
57 | base.GetObjectData(info, context); | ||
58 | } | ||
59 | } | ||
60 | } | ||