| 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.Data |
| 4 | { |
| 5 | using System; |
| 6 | |
| 7 | /// <summary> |
| 8 | /// Exception when file does not match the expected format. |
| 9 | /// </summary> |
| 10 | public class WixCorruptFileException : WixException |
| 11 | { |
| 12 | public WixCorruptFileException(string path, string format, Exception innerException = null) |
| 13 | : base(ErrorMessages.CorruptFileFormat(path, format), innerException) |
| 14 | { |
| 15 | this.Path = path; |
| 16 | this.FileFormat = format; |
| 17 | } |
| 18 | |
| 19 | /// <summary> |
| 20 | /// Gets the actual file format found in the file. |
| 21 | /// </summary> |
| 22 | public string FileFormat { get; } |
| 23 | |
| 24 | /// <summary> |
| 25 | /// Gets the path to the file with unexpected format. |
| 26 | /// </summary> |
| 27 | public string Path { get; } |
| 28 | } |
| 29 | } |