CA2200: don't explictly throw caught exception.

This commit is contained in:
Huo Yaoyuan 2019-12-03 19:20:49 +08:00
parent caf3f774ba
commit 61a6106e52
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,6 @@
<Rules AnalyzerId="Microsoft.CodeQuality.CSharp.Analyzers" RuleNamespace="Microsoft.CodeQuality.CSharp.Analyzers"> <Rules AnalyzerId="Microsoft.CodeQuality.CSharp.Analyzers" RuleNamespace="Microsoft.CodeQuality.CSharp.Analyzers">
<Rule Id="CA1001" Action="None" /> <Rule Id="CA1001" Action="None" />
<Rule Id="CA1032" Action="None" /> <Rule Id="CA1032" Action="None" />
<Rule Id="CA2200" Action="None" />
</Rules> </Rules>
<Rules AnalyzerId="Microsoft.NetCore.Analyzers" RuleNamespace="Microsoft.NetCore.Analyzers"> <Rules AnalyzerId="Microsoft.NetCore.Analyzers" RuleNamespace="Microsoft.NetCore.Analyzers">
<Rule Id="CA1303" Action="None" /> <Rule Id="CA1303" Action="None" />

View File

@ -10,6 +10,7 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Extensions.ExceptionExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Logging; using osu.Framework.Logging;
using osu.Game.Configuration; using osu.Game.Configuration;
@ -249,7 +250,7 @@ namespace osu.Game.Online.API
catch catch
{ {
// if we couldn't deserialize the error message let's throw the original exception outwards. // if we couldn't deserialize the error message let's throw the original exception outwards.
throw e; e.Rethrow();
} }
} }