summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-09-19 16:28:10 +0200
committerJose <jose@zeroc.com>2016-09-19 16:28:10 +0200
commit4942522714a072d139150f98d95bf825e5bc40ab (patch)
tree223e03a67da8339e04eaaa86ade9a17a5fa2bb86
parentFixed ICE-6363 (Java & C#) - hang when trying to contact the locator (diff)
downloadice-4942522714a072d139150f98d95bf825e5bc40ab.tar.bz2
ice-4942522714a072d139150f98d95bf825e5bc40ab.tar.xz
ice-4942522714a072d139150f98d95bf825e5bc40ab.zip
Fix ICE-7149 - catch exceptions thrown by GetTypes
-rw-r--r--csharp/src/Ice/AssemblyUtil.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/csharp/src/Ice/AssemblyUtil.cs b/csharp/src/Ice/AssemblyUtil.cs
index 454fde42b1b..04d8828074c 100644
--- a/csharp/src/Ice/AssemblyUtil.cs
+++ b/csharp/src/Ice/AssemblyUtil.cs
@@ -170,14 +170,21 @@ namespace IceInternal
loadAssemblies(); // Lazy initialization
foreach(Assembly a in _loadedAssemblies.Values)
{
- Type[] types = a.GetTypes();
- foreach(Type t in types)
+ try
{
- if(t.AssemblyQualifiedName.IndexOf(prefix, StringComparison.Ordinal) == 0)
+ Type[] types = a.GetTypes();
+ foreach(Type t in types)
{
- l.AddLast(t);
+ if(t.AssemblyQualifiedName.IndexOf(prefix, StringComparison.Ordinal) == 0)
+ {
+ l.AddLast(t);
+ }
}
}
+ catch(ReflectionTypeLoadException)
+ {
+ // Failed to load types from the assembly, ignore and continue
+ }
}
}