MessageControlNumber issue


Hi, I presumably found a issue in the code that I would like to share the resolution.

The function MessageControlNumber (ParseNodeExtension.cs), is causing the GenerateEDI to crash in case the controlNumber.Value is null, which can happen even if controlNumber is not null (when the D_329_2 is not provided for S_ST).

So adding the code below (or something like that) before the return will inform the user about the requirement and will not crash the library:

if (String.IsNullOrEmpty(controlNumber.Value))
            throw new Exception("Element at position 1 on UNH or ST was not found.");


DonZoeggerle wrote Dec 7, 2016 at 7:20 PM

Thank you for that, I'll include a fix in the next release.