mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Persists and surfaces plugin load failures
This commit is contained in:
1 parent
18361d5da7
commit
b32cc764a7
11 files changed
+279
-13
No files matched your search
@@ -24,7 +24,7 @@ internal static class PluginLoader
|
||||
public static PluginLoadResultDto LoadPlugins(string pluginsDirectory, IServiceCollection services)
|
||||
{
|
||||
List<IPlugin> plugins = [];
|
||||
List<string> errors = [];
|
||||
List<PluginLoadErrorDto> errors = [];
|
||||
|
||||
if (!Directory.Exists(pluginsDirectory))
|
||||
return new PluginLoadResultDto(plugins, errors);
|
||||
@@ -50,7 +50,7 @@ internal static class PluginLoader
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
errors.Add($"Failed to load plugin assembly '{Path.GetFileName(assemblyPath)}': {exception.Message}");
|
||||
errors.Add(new PluginLoadErrorDto(Path.GetFileNameWithoutExtension(assemblyPath), $"Failed to load plugin assembly '{Path.GetFileName(assemblyPath)}': {exception.Message}"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user