From 4ebc33174c02e1c9f5693b5ef38ecfe3292c687f Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 11 Aug 2017 00:39:04 -0700 Subject: Move to .NET Core 2.0 --- .../WixUnexpectedFileFormatException.cs | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/WixToolset.Data/WixUnexpectedFileFormatException.cs (limited to 'src/WixToolset.Data/WixUnexpectedFileFormatException.cs') diff --git a/src/WixToolset.Data/WixUnexpectedFileFormatException.cs b/src/WixToolset.Data/WixUnexpectedFileFormatException.cs new file mode 100644 index 00000000..4d1e39e9 --- /dev/null +++ b/src/WixToolset.Data/WixUnexpectedFileFormatException.cs @@ -0,0 +1,35 @@ +// 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. + +namespace WixToolset.Data +{ + using System; + + /// + /// Exception when file does not match the expected format. + /// + public class WixUnexpectedFileFormatException : WixException + { + public WixUnexpectedFileFormatException(string path, FileFormat expectedFormat, FileFormat format, Exception innerException = null) + : base(WixDataErrors.UnexpectedFileFormat(path, expectedFormat.ToString().ToLowerInvariant(), format.ToString().ToLowerInvariant()), innerException) + { + this.Path = path; + this.ExpectedFileFormat = expectedFormat; + this.FileFormat = format; + } + + /// + /// Gets the expected file format. + /// + public FileFormat ExpectedFileFormat { get; private set; } + + /// + /// Gets the actual file format found in the file. + /// + public FileFormat FileFormat { get; private set; } + + /// + /// Gets the path to the file with unexpected format. + /// + public string Path { get; set; } + } +} -- cgit v1.2.3-55-g6feb