From 25f217e3a304b0fd38730450455c331a252bf9df Mon Sep 17 00:00:00 2001 From: Chuck Lu Date: Fri, 6 Sep 2019 18:32:10 +0800 Subject: [PATCH 1/2] make sure the program will not crash when encounter exception --- de4dot-x64/Program.cs | 14 +++++++++++++- de4dot/Program.cs | 19 ++++++++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/de4dot-x64/Program.cs b/de4dot-x64/Program.cs index bd728449..4a994031 100644 --- a/de4dot-x64/Program.cs +++ b/de4dot-x64/Program.cs @@ -17,10 +17,22 @@ You should have received a copy of the GNU General Public License along with de4dot. If not, see . */ +using System; + namespace de4dot_x64 { class Program { static int Main(string[] args) { - return de4dot.cui.Program.Main(args); + int returnValue = 0; + try + { + returnValue = de4dot.cui.Program.Main(args); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + + return returnValue; } } } diff --git a/de4dot/Program.cs b/de4dot/Program.cs index 7a9cb796..eec575ac 100644 --- a/de4dot/Program.cs +++ b/de4dot/Program.cs @@ -17,10 +17,23 @@ You should have received a copy of the GNU General Public License along with de4dot. If not, see . */ +using System; + namespace de4dot_x86 { class Program { - static int Main(string[] args) { - return de4dot.cui.Program.Main(args); - } + static int Main(string[] args) + { + int returnValue = 0; + try + { + returnValue = de4dot.cui.Program.Main(args); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + + return returnValue; + } } } From 36ebff67fdc6af912882cb674e615c6050deff06 Mon Sep 17 00:00:00 2001 From: Chuck Lu Date: Fri, 6 Sep 2019 18:32:41 +0800 Subject: [PATCH 2/2] ignore .vs folder generated by visual studio --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a2d2f406..bca75c78 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /Debug/ /Release/ .idea/ +.vs \ No newline at end of file