Add a custom missing dependency exception

This commit is contained in:
Bepis committed 2018-04-01 02:15:27 +10:00
1 parent 255643830e
commit 09eaca0144
1 file changed
+14 -1
+14 -1
View File
@@ -72,7 +72,7 @@ namespace BepInEx
Type dependencyType = AllPlugins.FirstOrDefault(x => GetMetadata(x)?.GUID == dependency.refGUID);
if (dependencyType == null)
throw new Exception("Cannot find dependency type.");
throw new MissingDependencyException("Cannot find dependency type.");
dependencyTypes.Add(dependencyType);
}
@@ -80,4 +80,17 @@ namespace BepInEx
return dependencyTypes;
}
}
public class MissingDependencyException : Exception
{
public MissingDependencyException() : base()
{
}
public MissingDependencyException(string message) : base(message)
{
}
}
}