mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 08:56:15 +02:00
Add try catch when stopping plugin
This commit is contained in:
@@ -428,7 +428,15 @@ public partial class PluginWindow : Window
|
|||||||
{
|
{
|
||||||
App.Logger.LogInfo($"\"{PluginMetadata.Name}\" - Stopping plugin", source: "Plugin");
|
App.Logger.LogInfo($"\"{PluginMetadata.Name}\" - Stopping plugin", source: "Plugin");
|
||||||
IsRunning = false;
|
IsRunning = false;
|
||||||
pluginClassInstance?.Stop();
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pluginClassInstance?.Stop();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
App.Logger.LogError($"\"{PluginMetadata.Name}\" - {ex}", source: "Plugin");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Window Events
|
#region Window Events
|
||||||
|
|||||||
Reference in New Issue
Block a user