Skip to content

Commit

Permalink
Provide extra info when failing to initialize plugins with TypeLoadEx…
Browse files Browse the repository at this point in the history
…ception
  • Loading branch information
JustArchi committed Sep 16, 2024
1 parent cb4580c commit a279738
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ArchiSteamFarm/Plugins/PluginsCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ internal static async Task<bool> InitPlugins() {
using CompositionHost container = configuration.CreateContainer();

activePlugins = container.GetExports<IPlugin>().ToHashSet();
} catch (TypeLoadException e) {
ASF.ArchiLogger.LogGenericError(Strings.FormatWarningFailedWithError(e.TypeName));
ASF.ArchiLogger.LogGenericException(e);

await Task.Delay(SharedInfo.InformationDelay).ConfigureAwait(false);

return false;
} catch (Exception e) {
ASF.ArchiLogger.LogGenericException(e);

Expand Down

0 comments on commit a279738

Please sign in to comment.