From 36748a26320f5d60b6ef1379f74c23276ac83d39 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Wed, 25 Nov 2020 12:17:50 +0100 Subject: [PATCH] CLI: Handle metadata+binary exceptions the same way as package exceptions --- Il2CppInspector.CLI/Program.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Il2CppInspector.CLI/Program.cs b/Il2CppInspector.CLI/Program.cs index b4d8134..115907b 100644 --- a/Il2CppInspector.CLI/Program.cs +++ b/Il2CppInspector.CLI/Program.cs @@ -196,7 +196,13 @@ namespace Il2CppInspector.CLI return 1; } - il2cppInspectors = Il2CppInspector.LoadFromFile(options.BinaryFiles.First(), options.MetadataFile); + try { + il2cppInspectors = Il2CppInspector.LoadFromFile(options.BinaryFiles.First(), options.MetadataFile); + } + catch (Exception ex) { + Console.Error.WriteLine(ex.Message); + return 1; + } } }