1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 01:06:01 +08:00

Avoid an exceptions that break the loop and can't read remains assemblies

This commit is contained in:
Insthync 2021-07-28 03:12:16 +07:00
parent e09c60a702
commit a46480a987

View File

@ -149,7 +149,15 @@ namespace XNode {
case "Microsoft":
continue;
default:
nodeTypes.AddRange(assembly.GetTypes().Where(t => !t.IsAbstract && baseType.IsAssignableFrom(t)).ToArray());
try
{
nodeTypes.AddRange(assembly.GetTypes().Where(t => !t.IsAbstract && baseType.IsAssignableFrom(t)).ToArray());
}
catch (System.Exception ex)
{
Debug.LogError("Catched exception when building " + assemblyName + " caches");
Debug.LogException(ex);
}
break;
}
}