mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 12:15:01 +00:00
Fix error printing for plugin loading
This commit is contained in:
@@ -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}",
|
||||||
|
|||||||
Reference in New Issue
Block a user