using System;
namespace StardewModdingAPI.Framework.ModLoading
{
/// An exception raised when an incompatible instruction is found while loading a mod assembly.
internal class IncompatibleInstructionException : Exception
{
/*********
** Accessors
*********/
/// A brief noun phrase which describes the incompatible instruction that was found.
public string NounPhrase { get; }
/*********
** Public methods
*********/
/// Construct an instance.
/// A brief noun phrase which describes the incompatible instruction that was found.
public IncompatibleInstructionException(string nounPhrase)
: base($"Found an incompatible CIL instruction ({nounPhrase}).")
{
this.NounPhrase = nounPhrase;
}
/// Construct an instance.
/// A brief noun phrase which describes the incompatible instruction that was found.
/// A message which describes the error.
public IncompatibleInstructionException(string nounPhrase, string message)
: base(message)
{
this.NounPhrase = nounPhrase;
}
}
}