make sure the program will not crash when encounter exception

This commit is contained in:
Chuck Lu 2019-09-06 18:32:10 +08:00
parent c019e21743
commit 25f217e3a3
2 changed files with 29 additions and 4 deletions

View File

@ -17,10 +17,22 @@
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}
}
}

View File

@ -17,10 +17,23 @@
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}
}
}