summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/SemanticVersion.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-02-23 23:36:14 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-02-23 23:36:14 -0500
commit6b26eceb57b8c1bdf245ec02ff979504701ede92 (patch)
treeacbbf14ed626bb33a8a909741f55ef23ede3bf66 /src/StardewModdingAPI/SemanticVersion.cs
parent3005270437f609bb14be9da67e3ffadabd8685a3 (diff)
downloadSMAPI-6b26eceb57b8c1bdf245ec02ff979504701ede92.tar.gz
SMAPI-6b26eceb57b8c1bdf245ec02ff979504701ede92.tar.bz2
SMAPI-6b26eceb57b8c1bdf245ec02ff979504701ede92.zip
move incompatible mod logic into mod registry
Diffstat (limited to 'src/StardewModdingAPI/SemanticVersion.cs')
-rw-r--r--src/StardewModdingAPI/SemanticVersion.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/SemanticVersion.cs b/src/StardewModdingAPI/SemanticVersion.cs
index 3cb592e2..9610562f 100644
--- a/src/StardewModdingAPI/SemanticVersion.cs
+++ b/src/StardewModdingAPI/SemanticVersion.cs
@@ -63,9 +63,13 @@ namespace StardewModdingAPI
/// <summary>Get an integer indicating whether this version precedes (less than 0), supercedes (more than 0), or is equivalent to (0) the specified version.</summary>
/// <param name="other">The version to compare with this instance.</param>
+ /// <exception cref="ArgumentNullException">The <paramref name="other"/> value is null.</exception>
/// <remarks>The implementation is defined by Semantic Version 2.0 (http://semver.org/).</remarks>
public int CompareTo(ISemanticVersion other)
{
+ if(other == null)
+ throw new ArgumentNullException(nameof(other));
+
const int same = 0;
const int curNewer = 1;
const int curOlder = -1;