mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
Fix error printing for plugin loading
This commit is contained in:
parent
6ddfdc4b38
commit
8cfd58bb7e
1 changed files with 14 additions and 8 deletions
|
|
@ -358,7 +358,19 @@ namespace PepperDash.Essentials
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var assy = loadedAssembly.Assembly;
|
var assy = loadedAssembly.Assembly;
|
||||||
var types = assy.GetTypes();
|
CType[] types = {};
|
||||||
|
try
|
||||||
|
{
|
||||||
|
types = assy.GetTypes();
|
||||||
|
}
|
||||||
|
catch (TypeLoadException e)
|
||||||
|
{
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Warning, "Unable to get types for assembly {0}: {1}",
|
||||||
|
loadedAssembly.Name, e.Message);
|
||||||
|
Debug.Console(2, e.StackTrace);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var type in types)
|
foreach (var type in types)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
@ -382,7 +394,7 @@ namespace PepperDash.Essentials
|
||||||
catch (NotSupportedException e)
|
catch (NotSupportedException e)
|
||||||
{
|
{
|
||||||
//this happens for dlls that aren't PD dlls, like ports of Mono classes into S#. Swallowing.
|
//this happens for dlls that aren't PD dlls, like ports of Mono classes into S#. Swallowing.
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
@ -392,12 +404,6 @@ namespace PepperDash.Essentials
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (TypeLoadException e)
|
|
||||||
{
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Warning, "Unable to load assembly {0}: {1}",
|
|
||||||
loadedAssembly.Name, e.Message);
|
|
||||||
Debug.Console(2, e.StackTrace);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Warning, "Error Loading assembly {0}: {1}",
|
Debug.Console(0, Debug.ErrorLogLevel.Warning, "Error Loading assembly {0}: {1}",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue