From 728a6cf1e7e59f62a0e11d4bb1fe4e34d30a3dc6 Mon Sep 17 00:00:00 2001 From: goyuken Date: Sun, 24 Aug 2014 17:25:29 +0000 Subject: [PATCH] fix FDS and maybe CGB load fail switch, which were broken because i broke them --- BizHawk.Client.Common/RomLoader.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BizHawk.Client.Common/RomLoader.cs b/BizHawk.Client.Common/RomLoader.cs index 31e25a1a6f..f9e57a4f62 100644 --- a/BizHawk.Client.Common/RomLoader.cs +++ b/BizHawk.Client.Common/RomLoader.cs @@ -427,6 +427,11 @@ namespace BizHawk.Client.Common system = game.System; } + // all of the specific exceptions we're trying to catch here aren't expected to have inner exceptions, + // so drill down in case we got a TargetInvocationException or something like that + while (ex.InnerException != null) + ex = ex.InnerException; + // Specific hack here, as we get more cores of the same system, this isn't scalable if (ex is UnsupportedMapperException) {