Change this to a warning, pass throwExceptionOnSyntaxErrors

Aug 5, 2014 at 1:56 PM
receiving the below error:

ex {"Segment 'NTEDELSHIP NO MORE THAN 5 DAYS PRIOR TO SHIP DATE' in segment position 59 within transaction '000091162' cannot be identified within the supplied specification for transaction set 830 in any of the expected loops: LIN,SHP. To change this to a warning, pass throwExceptionOnSyntaxErrors = false to the X12Parser constructor.\r\nParameter name: 830"} System.Exception

code:
var parser = new X12Parser();
        Interchange interchange = parser.Parse(fstream);
        string xml824 = interchange.Serialize();

        //dump to xml file
        XmlDocument myDocument = new XmlDocument();
        myDocument.LoadXml(xml824.Trim());

how to fix!!
Aug 5, 2014 at 6:49 PM
leeman wrote:
receiving the below error:

ex {"Segment 'NTEDELSHIP NO MORE THAN 5 DAYS PRIOR TO SHIP DATE' in segment position 59 within transaction '000091162' cannot be identified within the supplied specification for transaction set 830 in any of the expected loops: LIN,SHP. To change this to a warning, pass throwExceptionOnSyntaxErrors = false to the X12Parser constructor.\r\nParameter name: 830"} System.Exception

code:
var parser = new X12Parser();
        Interchange interchange = parser.Parse(fstream);
        string xml824 = interchange.Serialize();

        //dump to xml file
        XmlDocument myDocument = new XmlDocument();
        myDocument.LoadXml(xml824.Trim());

how to fix!!
Update: fixed with the following - var parser = new X12Parser(new SpecificationFinder(), false); added constructor values!!