From 2a63293807d88d2258ea29ecbb2de2001e98c38d Mon Sep 17 00:00:00 2001 From: atom0s Date: Sun, 28 May 2023 02:08:05 -0700 Subject: [PATCH] Plugin: (AutomaticPlugin) Add additional error messages for when failing to parse a valid PE file and when an exception happens during parsing. --- Steamless/Model/AutomaticPlugin.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Steamless/Model/AutomaticPlugin.cs b/Steamless/Model/AutomaticPlugin.cs index c2c5793..f23f2ab 100644 --- a/Steamless/Model/AutomaticPlugin.cs +++ b/Steamless/Model/AutomaticPlugin.cs @@ -143,10 +143,18 @@ namespace Steamless.Model return false; } } + else + { + this.Log("", LogMessageType.Error); + this.Log("This file does not appear to be a valid Win32 PE file. Cannot unpack!", LogMessageType.Error); + this.Log("", LogMessageType.Error); + } } - catch + catch (Exception e) { - return false; + this.Log("Failed to parse or unpack the selected file due to an exception:", LogMessageType.Error); + this.Log("", LogMessageType.Error); + this.Log(e.Message, LogMessageType.Error); } return false;