// 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;
///
/// Base class for all WiX exceptions.
///
[Serializable]
public class WixException : Exception
{
///
/// Instantiate a new WixException with a given WixError.
///
/// The localized error information.
public WixException(Message error)
: this(error, null)
{
}
///
/// Instantiate a new WixException with a given WixError.
///
/// The localized error information.
/// Original exception.
public WixException(Message error, Exception exception) :
base(error.ToString(), exception)
{
this.Error = error;
}
///
/// Gets the error message.
///
/// The error message.
public Message Error { get; }
}
}