aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/WixCorruptFileException.cs
blob: 83c3eb80487a685293c2edb465816eaca55ea95a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;

    /// <summary>
    /// Exception when file does not match the expected format.
    /// </summary>
    public class WixCorruptFileException : WixException
    {
        public WixCorruptFileException(string path, string format, Exception innerException = null)
            : base(ErrorMessages.CorruptFileFormat(path, format), innerException)
        {
            this.Path = path;
            this.FileFormat = format;
        }

        /// <summary>
        /// Gets the actual file format found in the file.
        /// </summary>
        public string FileFormat { get; }

        /// <summary>
        /// Gets the path to the file with unexpected format.
        /// </summary>
        public string Path { get; }
    }
}