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 --- src/WixToolset.Data/WixCorruptFileException.cs | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/WixToolset.Data/WixCorruptFileException.cs (limited to 'src/WixToolset.Data/WixCorruptFileException.cs') 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 @@ +// 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 WixCorruptFileException : WixException + { + public WixCorruptFileException(string path, FileFormat format, Exception innerException = null) + : base(WixDataErrors.CorruptFileFormat(path, format.ToString().ToLowerInvariant()), innerException) + { + this.Path = path; + this.FileFormat = format; + } + + /// + /// 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