Enable MA0054 and fix noncompliance

"Embed the caught exception as innerException"
This commit is contained in:
YoshiRulz 2022-07-19 08:26:09 +10:00
parent 8ac4dabaf7
commit 5a8a24e936
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 3 additions and 3 deletions

View File

@ -270,7 +270,7 @@
<Rule Id="MA0053" Action="Hidden" />
<!-- Embed the caught exception as innerException -->
<Rule Id="MA0054" Action="Hidden" />
<Rule Id="MA0054" Action="Error" />
<!-- Do not use finalizer -->
<Rule Id="MA0055" Action="Hidden" />

View File

@ -90,9 +90,9 @@ namespace BizHawk.Client.Common
data = File.ReadAllBytes(fullPath.Split('|').First());
}
}
catch
catch (Exception e)
{
throw new Exception($"Couldn't load XMLGame LoadAsset \"{filename}\"");
throw new Exception($"Couldn't load XMLGame LoadAsset \"{filename}\"", e);
}
}