Skip to content

Commit 0f8bf75

Browse files
committed
Indicate null state is an error, not incorrect user action
1 parent 728bc57 commit 0f8bf75

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

OpenEphys.Onix1/NeuropixelsV2eBetaData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public unsafe override IObservable<NeuropixelsV2eBetaDataFrame> Generate()
7272

7373
double gainCorrection = ProbeIndex switch
7474
{
75-
NeuropixelsV2Probe.ProbeA => info.GainCorrectionA ?? throw new NullReferenceException($"No gain correction value found for {ProbeIndex}. Ensure that the probe is connected and the gain correction file is selected."),
76-
NeuropixelsV2Probe.ProbeB => info.GainCorrectionB ?? throw new NullReferenceException($"No gain correction value found for {ProbeIndex}. Ensure that the probe is connected and the gain correction file is selected."),
75+
NeuropixelsV2Probe.ProbeA => info.GainCorrectionA ?? throw new NullReferenceException($"Gain correction value is null for {ProbeIndex}."),
76+
NeuropixelsV2Probe.ProbeB => info.GainCorrectionB ?? throw new NullReferenceException($"Gain correction value is null for {ProbeIndex}."),
7777
_ => throw new InvalidEnumArgumentException($"Unexpected {nameof(ProbeIndex)} value: {ProbeIndex}")
7878
};
7979

OpenEphys.Onix1/NeuropixelsV2eData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ public unsafe override IObservable<NeuropixelsV2eDataFrame> Generate()
7676

7777
double gainCorrection = ProbeIndex switch
7878
{
79-
NeuropixelsV2Probe.ProbeA => info.GainCorrectionA ?? throw new NullReferenceException($"No gain correction value found for {ProbeIndex}. Ensure that the probe is connected and the gain correction file is selected."),
80-
NeuropixelsV2Probe.ProbeB => info.GainCorrectionB ?? throw new NullReferenceException($"No gain correction value found for {ProbeIndex}. Ensure that the probe is connected and the gain correction file is selected."),
79+
NeuropixelsV2Probe.ProbeA => info.GainCorrectionA ?? throw new NullReferenceException($"Gain correction value is null for {ProbeIndex}."),
80+
NeuropixelsV2Probe.ProbeB => info.GainCorrectionB ?? throw new NullReferenceException($"Gain correction value is null for {ProbeIndex}."),
8181
_ => throw new InvalidEnumArgumentException($"Unexpected {nameof(ProbeIndex)} value: {ProbeIndex}")
8282
};
8383

0 commit comments

Comments
 (0)