// 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; }
}
}