diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-08-11 00:39:04 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-08-15 01:51:22 -0700 |
| commit | 4ebc33174c02e1c9f5693b5ef38ecfe3292c687f (patch) | |
| tree | 5800ee5feb0cb30d71c706d36ce2ef857e9b87c3 /src/WixToolset.Data/WixCorruptFileException.cs | |
| parent | b558e6bb06aa27f57670736bfd3e22cc34ab0669 (diff) | |
| download | wix-4ebc33174c02e1c9f5693b5ef38ecfe3292c687f.tar.gz wix-4ebc33174c02e1c9f5693b5ef38ecfe3292c687f.tar.bz2 wix-4ebc33174c02e1c9f5693b5ef38ecfe3292c687f.zip | |
Move to .NET Core 2.0
Diffstat (limited to 'src/WixToolset.Data/WixCorruptFileException.cs')
| -rw-r--r-- | src/WixToolset.Data/WixCorruptFileException.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/WixToolset.Data/WixCorruptFileException.cs b/src/WixToolset.Data/WixCorruptFileException.cs new file mode 100644 index 00000000..f663b92d --- /dev/null +++ b/src/WixToolset.Data/WixCorruptFileException.cs | |||
| @@ -0,0 +1,29 @@ | |||
| 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, FileFormat format, Exception innerException = null) | ||
| 13 | : base(WixDataErrors.CorruptFileFormat(path, format.ToString().ToLowerInvariant()), 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 FileFormat FileFormat { get; private set; } | ||
| 23 | |||
| 24 | /// <summary> | ||
| 25 | /// Gets the path to the file with unexpected format. | ||
| 26 | /// </summary> | ||
| 27 | public string Path { get; set; } | ||
| 28 | } | ||
| 29 | } | ||
