Permalink
Browse files

Fixes some possible assembly loading errors

  • Loading branch information...
1 parent 776d720 commit acbda2015c676f42c5e01b94a208a1e7012b632e chris.nicola committed Aug 10, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/Nancy/Extensions/AssemblyExtensions.cs
@@ -31,6 +31,13 @@ public static Type[] SafeGetExportedTypes(this Assembly assembly)
{
types = new Type[] { };
}
+ catch (FileLoadException)
+ {
+ types = new Type[] { };
+ }
+ catch (TypeLoadException) {
+ types = new Type[] { };
+ }
return types;
}

0 comments on commit acbda20

Please sign in to comment.