If an IOException is thrown, it's not a PE file

This commit is contained in:
de4dot 2013-11-14 17:39:59 +01:00
parent 130e188e6a
commit 7c44c2616c

View File

@ -229,6 +229,11 @@ namespace de4dot.cui {
catch (EndOfStreamException) {
return false;
}
catch (IOException) {
if (isFromPossibleFiles)
Logger.Instance.Log(false, null, LoggerEvent.Warning, "The file isn't a .NET PE file: {0}", file.Filename);
return false; // Not a .NET file
}
catch (Exception ex) {
Logger.Instance.Log(false, null, LoggerEvent.Warning, "Could not load file ({0}): {1}", ex.GetType(), file.Filename);
return false;