mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix(PluginManager): allow LoadError state in Unload()
This commit is contained in:
parent
d43f07dc04
commit
bf158c9386
1 changed files with 1 additions and 3 deletions
|
|
@ -315,13 +315,11 @@ namespace Dalamud.Plugin.Internal
|
||||||
/// <param name="reloading">Unload while reloading.</param>
|
/// <param name="reloading">Unload while reloading.</param>
|
||||||
public void Unload(bool reloading = false)
|
public void Unload(bool reloading = false)
|
||||||
{
|
{
|
||||||
// Allowed: Loaded
|
// Allowed: Loaded, LoadError(we are cleaning this up while we're at it)
|
||||||
switch (this.State)
|
switch (this.State)
|
||||||
{
|
{
|
||||||
case PluginState.InProgress:
|
case PluginState.InProgress:
|
||||||
throw new InvalidPluginOperationException($"Unable to unload {this.Name}, already working");
|
throw new InvalidPluginOperationException($"Unable to unload {this.Name}, already working");
|
||||||
case PluginState.LoadError:
|
|
||||||
throw new InvalidPluginOperationException($"Unable to unload {this.Name}, load previously faulted, unload first");
|
|
||||||
case PluginState.Unloaded:
|
case PluginState.Unloaded:
|
||||||
throw new InvalidPluginOperationException($"Unable to unload {this.Name}, already unloaded");
|
throw new InvalidPluginOperationException($"Unable to unload {this.Name}, already unloaded");
|
||||||
case PluginState.UnloadError:
|
case PluginState.UnloadError:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue