Skip to content

Commit 9058afd

Browse files
committed
Update error messages
1 parent ba16397 commit 9058afd

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Flow.Launcher.Core/Plugin/PluginsLoader.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static IEnumerable<PluginPair> DotNetPlugins(List<PluginMetadata> source)
5555
{
5656
erroredPlugins.Add(metadata.Name);
5757

58-
Log.Exception($"|PluginsLoader.DotNetPlugins|Couldn't load assembly for {metadata.Name}", e);
58+
Log.Exception($"|PluginsLoader.DotNetPlugins|Couldn't load assembly for the plugin: {metadata.Name}", e);
5959
return;
6060
}
6161

@@ -70,14 +70,14 @@ public static IEnumerable<PluginPair> DotNetPlugins(List<PluginMetadata> source)
7070
{
7171
erroredPlugins.Add(metadata.Name);
7272

73-
Log.Exception($"|PluginsLoader.DotNetPlugins|Can't find class implement IPlugin for <{metadata.Name}>", e);
73+
Log.Exception($"|PluginsLoader.DotNetPlugins|Can't find the required IPlugin interface for the plugin: <{metadata.Name}>", e);
7474
return;
7575
}
7676
catch (ReflectionTypeLoadException e)
7777
{
7878
erroredPlugins.Add(metadata.Name);
7979

80-
Log.Exception($"|PluginsLoader.DotNetPlugins|The GetTypes method was unable to load assembly types for <{metadata.Name}>", e);
80+
Log.Exception($"|PluginsLoader.DotNetPlugins|The GetTypes method was unable to load assembly types for the plugin: <{metadata.Name}>", e);
8181
return;
8282
}
8383

@@ -90,7 +90,7 @@ public static IEnumerable<PluginPair> DotNetPlugins(List<PluginMetadata> source)
9090
{
9191
erroredPlugins.Add(metadata.Name);
9292

93-
Log.Exception($"|PluginsLoader.DotNetPlugins|Can't create instance for <{metadata.Name}>", e);
93+
Log.Exception($"|PluginsLoader.DotNetPlugins|The following plugin has errored and can not be loaded: <{metadata.Name}>", e);
9494
return;
9595
}
9696
#endif
@@ -109,11 +109,15 @@ public static IEnumerable<PluginPair> DotNetPlugins(List<PluginMetadata> source)
109109
{
110110
var errorPluginString = "";
111111

112+
var errorMessage = "The following "
113+
+ (erroredPlugins.Count > 1 ? "plugins have " : "plugin has ")
114+
+ "errored and cannot be loaded:";
115+
112116
erroredPlugins.ForEach(x => errorPluginString += x + Environment.NewLine);
113117

114118
Task.Run(() =>
115119
{
116-
MessageBox.Show($"Uh oh, unable to load plugins:{Environment.NewLine}{errorPluginString}");
120+
MessageBox.Show($"{errorMessage}{Environment.NewLine}{errorPluginString}");
117121
});
118122
}
119123

0 commit comments

Comments
 (0)