Merge pull request #204 from Aireil/confusing_exception

Avoid exception log when updating a plugin that is not installed
This commit is contained in:
goaaats 2020-12-03 20:04:42 +01:00 committed by GitHub
commit 8f0157c047
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -216,12 +216,15 @@ namespace Dalamud.Plugin
Log.Verbose("wasEnabled: {0}", wasEnabled); Log.Verbose("wasEnabled: {0}", wasEnabled);
// Try to disable plugin if it is loaded // Try to disable plugin if it is loaded
if (wasEnabled) {
try { try {
this.dalamud.PluginManager.DisablePlugin(info); this.dalamud.PluginManager.DisablePlugin(info);
} catch (Exception ex) { }
catch (Exception ex) {
Log.Error(ex, "Plugin disable failed"); Log.Error(ex, "Plugin disable failed");
//hasError = true; //hasError = true;
} }
}
try { try {
// Just to be safe // Just to be safe