summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Framework/IncompatibleInstructionException.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-03-12 01:31:15 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-03-12 01:31:15 -0500
commit6d2d90b7681e4e274e92742e98905ec4000486ca (patch)
tree80241918427c710303156d18f369f9b3b92717e6 /src/StardewModdingAPI/Framework/IncompatibleInstructionException.cs
parentb0fab4a0764d4cd1eb807db88e704aa401e4f716 (diff)
downloadSMAPI-6d2d90b7681e4e274e92742e98905ec4000486ca.tar.gz
SMAPI-6d2d90b7681e4e274e92742e98905ec4000486ca.tar.bz2
SMAPI-6d2d90b7681e4e274e92742e98905ec4000486ca.zip
add logic to detect incompatible mod instructions & reject mod load (#247)
Diffstat (limited to 'src/StardewModdingAPI/Framework/IncompatibleInstructionException.cs')
-rw-r--r--src/StardewModdingAPI/Framework/IncompatibleInstructionException.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Framework/IncompatibleInstructionException.cs b/src/StardewModdingAPI/Framework/IncompatibleInstructionException.cs
new file mode 100644
index 00000000..affe2cb3
--- /dev/null
+++ b/src/StardewModdingAPI/Framework/IncompatibleInstructionException.cs
@@ -0,0 +1,27 @@
+using System;
+
+namespace StardewModdingAPI.Framework
+{
+ /// <summary>An exception raised when an incompatible instruction is found while loading a mod assembly.</summary>
+ internal 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>
+ /// <param name="message">A message which describes the error.</param>
+ public IncompatibleInstructionException(string nounPhrase, string message)
+ : base(message)
+ {
+ this.NounPhrase = nounPhrase;
+ }
+ }
+}