blob: f7e6bd8fe1be40c47070d10411bf7e5f7286c6ff (
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
30
31
32
33
34
35
|
using System;
namespace StardewModdingAPI.AssemblyRewriters
{
/// <summary>An exception raised when an incompatible instruction is found while loading a mod assembly.</summary>
public class IncompatibleInstructionException : Exception
{
/*********
** Accessors
*********/
/// <summary>A brief noun phrase which describes the incompatible instruction that was found.</summary>
public string NounPhrase { get; }
/*********
** Public methods
*********/
/// <summary>Construct an instance.</summary>
/// <param name="nounPhrase">A brief noun phrase which describes the incompatible instruction that was found.</param>
public IncompatibleInstructionException(string nounPhrase)
: base($"Found an incompatible CIL instruction ({nounPhrase}).")
{
this.NounPhrase = nounPhrase;
}
/// <summary>Construct an instance.</summary>
/// <param name="nounPhrase">A brief noun phrase which describes the incompatible instruction that was found.</param>
/// <param name="message">A message which describes the error.</param>
public IncompatibleInstructionException(string nounPhrase, string message)
: base(message)
{
this.NounPhrase = nounPhrase;
}
}
}
|