See “Example 8” for an example of registering a ConverterListener.
The EDIConverterListener is a specialized version of ConverterListener; its methods provide detailed information about error conditions. The invalidCharacter() method, for example, is called when a character does not match the specified encoding in the EDI stream. Similarly, unknownCodeListValue() is called when a codelist validation fails.
The EDIConverterException is a specialized version of ConverterException that contains extra information about the context of errors in EDI files. When a ConverterException is thrown while processing an EDI file, or when a ConverterListener is registered and a warning(), error(), or fatalError() is called, the exception that is thrown is probably EDIConverterException. This exception contains the following methods to probe the context of the specific error – GetContentData(), getControlData(), getData(), and getError(). Processing can recover from both warnings and errors; however, fatal errors always stop the processing.