From cc2e1b61a684d9de2b8f5ae3e832b2080ad534ac Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Tue, 22 Oct 2019 16:44:44 +0200 Subject: [PATCH] Don't prevent other exceptions on known architecture --- Il2CppInspector/Il2CppBinary.cs | 2 +- Il2CppInspector/Il2CppInspector.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Il2CppInspector/Il2CppBinary.cs b/Il2CppInspector/Il2CppBinary.cs index d9b019c..aabf7c8 100644 --- a/Il2CppInspector/Il2CppBinary.cs +++ b/Il2CppInspector/Il2CppBinary.cs @@ -50,7 +50,7 @@ namespace Il2CppInspector // Get type from image architecture var type = Assembly.GetExecutingAssembly().GetType("Il2CppInspector.Il2CppBinary" + stream.Arch.ToUpper()); if (type == null) - throw new InvalidOperationException("Unsupported architecture: " + stream.Arch); + throw new NotImplementedException("Unsupported architecture: " + stream.Arch); var inst = (Il2CppBinary) Activator.CreateInstance(type, stream); diff --git a/Il2CppInspector/Il2CppInspector.cs b/Il2CppInspector/Il2CppInspector.cs index c33893c..5f6fca7 100644 --- a/Il2CppInspector/Il2CppInspector.cs +++ b/Il2CppInspector/Il2CppInspector.cs @@ -182,7 +182,8 @@ namespace Il2CppInspector Console.Error.WriteLine("Could not process IL2CPP image"); } } - catch (InvalidOperationException ex) { + // Unknown architecture + catch (NotImplementedException ex) { Console.Error.WriteLine(ex.Message); } }