報告の例外に呼び出し元のスタックを付ける処理を除く

このコミットが含まれているのは:
routersys committed 2026-10-02 20:31:54 +09:00
1 親 2dc1b14eb6
コミット c1599658cf
3ファイル変更
+1 -23

検索条件に一致するファイルはありません

-13
ファイルの表示
@@ -163,19 +163,6 @@ public sealed class ComputeGuardianJudgementTests
Assert.Equal(new ComputeDecision(ComputeRoute.Gpu, ComputeRouteReason.Trusted), decision);
}
[Fact]
public void TheReportCarriesTheStackOfTheCaller()
{
var (guardian, reports) = CreateTrustedGuardian();
guardian.Judge(Device(), Workload, [FirstFailingCheck]);
var report = Assert.Single(reports);
Assert.NotNull(report.StackTrace);
Assert.Contains(nameof(ComputeGuardian.Judge), report.StackTrace);
Assert.Contains(nameof(TheReportCarriesTheStackOfTheCaller), report.StackTrace);
}
[Fact]
public void APassingJudgementAllocatesNothing()
{
+1 -4
ファイルの表示
@@ -1,5 +1,4 @@
using System.Collections.Concurrent;
using System.Runtime.ExceptionServices;
namespace ComputeGuard;
@@ -132,9 +131,7 @@ internal sealed class ComputeGuardian
return;
}
var anomaly = new ComputeAnomalyException(new ComputeAnomaly(device, workload, failure, check), exception);
ExceptionDispatchInfo.SetCurrentStackTrace(anomaly);
report(anomaly);
report(new ComputeAnomalyException(new ComputeAnomaly(device, workload, failure, check), exception));
}
private sealed class HealthCell
-6
ファイルの表示
@@ -359,12 +359,6 @@
"find": " || failure == ComputeFailure.ResourceExhausted",
"replace": ""
},
{
"name": "呼び出し元のスタックを付けない",
"file": "ComputeGuard/ComputeGuardian.cs",
"find": "ExceptionDispatchInfo.SetCurrentStackTrace(anomaly);",
"replace": ""
},
{
"name": "固定の判定を逆にする",
"file": "ComputeGuard/ComputeGuardian.cs",