Skip to content

Commit

Permalink
OtherOrganizationで例外を出さないようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
ingen084 committed Feb 23, 2024
1 parent 324e48e commit 7039220
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ public class OtherOrganizationDCReport(byte[] rawData, Preamble preamble, byte m
public static OtherOrganizationDCReport Parse(byte[] rawData, Preamble preamble, byte messageType)
{
var rc = (ReportClassification)GetValue(rawData, 14, 3);
if (!Enum.IsDefined(rc))
throw new DCReportParseException("Rc が不正です: " + rc);
//if (!Enum.IsDefined(rc))
// throw new DCReportParseException("Rc が不正です: " + rc);

var oc = (byte)GetValue(rawData, 17, 6);
if (oc is < 1 or > 60)
throw new DCReportParseException("Oc が範囲外です: " + oc);
//if (oc is < 1 or > 60)
// throw new DCReportParseException("Oc が範囲外です: " + oc);

return new OtherOrganizationDCReport(rawData, preamble, messageType, rc, oc);
}
Expand Down

0 comments on commit 7039220

Please sign in to comment.