Skip to content

Commit

Permalink
add hints when plugin loading failed #84
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesWu committed Jun 13, 2022
1 parent c920ce3 commit 11bac3d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions FreeMote.Psb/Plugins/FreeMount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void InitPlugins(string path)
}
catch (CompositionException compositionException)
{
Debug.WriteLine(compositionException.ToString());
Console.WriteLine(compositionException.ToString());
}

UpdatePluginsCollection();
Expand Down Expand Up @@ -224,7 +224,17 @@ private void AddCatalog(string path, AggregateCatalog catalog)
}
else if (File.Exists(path))
{
catalog.Catalogs.Add(new AssemblyCatalog(Assembly.LoadFile(path)));
try
{
catalog.Catalogs.Add(new AssemblyCatalog(Assembly.LoadFile(path)));
}
catch (NotSupportedException e)
{
Console.WriteLine($"[ERROR] Load plugin failed from {path}");
Console.WriteLine(@"1. Are you running program on OneDrive or over local network? Try running on your local drive.
2. Try unblocking this file from properties. If you don't know how to do this, google it.");
Console.WriteLine(e);
}
}
}

Expand Down

0 comments on commit 11bac3d

Please sign in to comment.