mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Add a custom missing dependency exception
This commit is contained in:
1 parent
255643830e
commit
09eaca0144
1 file changed
+14
-1
+14
-1
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user