| 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 |
| 4 | { |
| 5 | using System; |
| 6 | using System.IO; |
| 7 | using System.Runtime.Serialization; |
| 8 | |
| 9 | /// <summary> |
| 10 | /// Base exception class for compression operations. Compression libraries should |
| 11 | /// derive subclass exceptions with more specific error information relevent to the |
| 12 | /// file format. |
| 13 | /// </summary> |
| 14 | [Serializable] |
| 15 | public class ArchiveException : IOException |
| 16 | { |
| 17 | /// <summary> |
| 18 | /// Creates a new ArchiveException 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 ArchiveException(string message, Exception innerException) |
| 26 | : base(message, innerException) |
| 27 | { |
| 28 | } |
| 29 | |
| 30 | /// <summary> |
| 31 | /// Creates a new ArchiveException with a specified error message. |
| 32 | /// </summary> |
| 33 | /// <param name="message">The message that describes the error.</param> |
| 34 | public ArchiveException(string message) |
| 35 | : this(message, null) |
| 36 | { |
| 37 | } |
| 38 | |
| 39 | /// <summary> |
| 40 | /// Creates a new ArchiveException. |
| 41 | /// </summary> |
| 42 | public ArchiveException() |
| 43 | : this(null, null) |
| 44 | { |
| 45 | } |
| 46 | |
| 47 | /// <summary> |
| 48 | /// Initializes a new instance of the ArchiveException class with serialized data. |
| 49 | /// </summary> |
| 50 | /// <param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param> |
| 51 | /// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param> |
| 52 | protected ArchiveException(SerializationInfo info, StreamingContext context) |
| 53 | : base(info, context) |
| 54 | { |
| 55 | } |
| 56 | } |
| 57 | } |