Skip to content

Commit 6b9c9e9

Browse files
committed
Log exception instead of throw exception
1 parent 4527b33 commit 6b9c9e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ private static void DeletePythonBinding()
6161
/// </summary>
6262
public static void Save()
6363
{
64-
foreach (var plugin in AllPlugins)
64+
foreach (var pluginPair in AllPlugins)
6565
{
66-
var savable = plugin.Plugin as ISavable;
66+
var savable = pluginPair.Plugin as ISavable;
6767
try
6868
{
6969
savable?.Save();
7070
}
7171
catch (Exception e)
7272
{
73-
throw new FlowPluginException(plugin.Metadata, e);
73+
API.LogException(ClassName, $"Failed to save plugin {pluginPair.Metadata.Name}", e);
7474
}
7575
}
7676

@@ -102,7 +102,7 @@ private static async Task DisposePluginAsync(PluginPair pluginPair)
102102
}
103103
catch (Exception e)
104104
{
105-
throw new FlowPluginException(pluginPair.Metadata, e);
105+
API.LogException(ClassName, $"Failed to dispose plugin {pluginPair.Metadata.Name}", e);
106106
}
107107
}
108108

0 commit comments

Comments
 (0)