mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Throw meaningful exceptions, not Linq exceptions
This commit is contained in:
parent
9f863a4dbb
commit
92d943937a
1 changed files with 3 additions and 1 deletions
|
|
@ -57,7 +57,9 @@ namespace Dalamud.Plugin.Internal
|
|||
this.pluginAssembly = this.loader.LoadDefaultAssembly();
|
||||
|
||||
// InvalidOperationException
|
||||
this.pluginType = this.pluginAssembly.GetTypes().First(type => type.IsAssignableTo(typeof(IDalamudPlugin)));
|
||||
this.pluginType = this.pluginAssembly.GetTypes().FirstOrDefault(type => type.IsAssignableTo(typeof(IDalamudPlugin)));
|
||||
if (this.pluginType == default)
|
||||
throw new Exception("Nothing inherits from IDalamudPlugin");
|
||||
|
||||
assemblyVersion = this.pluginAssembly.GetName().Version;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue