Framework EDI Reference. Events in FREDI .NET Hybrid
ediDocument. EventNotifyInfo

The event handler that gets called when supplemental information about an error is available.

Syntax:

Parameters:

Example:

The following is an example as how to listen to errors and supplemental errors:

' Set up FREDI to receive events in the module
Private WithEvents m_oEdiDoc As ediDocument
          :
   ' In the main routine start an instance of FREDI
   Set m_oEdiDoc = New ediDocument

          :

          :

' This is an event handler for EventNotifyInfo that captures all supplemental errors
' provided by FREDI.
Private Sub m_oEdiDoc_EventNotifyInfo(ByVal EventNotifyInfo As Edidev.FrameworkEDI.ediEventNotifyInfo) Handles m_oEdiDoc.EventNotifyInfo

If EventNotifyInfo.EventInfoType = EventIDConstants.Event_Info_Error_Segment_Handle Then
' Supplemental error has been passed. In this case, the error
' generated has happened in the following segment handle.
TextBox1.Text = TextBox1.Text & "Segment Handle: " & CStr(EventNotifyInfo.NumericInfo) & vbCrLf

' The following error code ties this supplemental error to an
' error generated by EventNotify
TextBox1.Text = TextBox1.Text & "Error Code: " & EventNotifyInfo.StringInfo & vbCrLf
Application.DoEvents()
ElseIf InfoType = EventIDConstants.Event_Info_Error_Element_Position Then
' Supplemental error has been passed. In this case, the error
' generated has happened in the following data element in
' a segment having the following data segment handle.
TextBox1.Text = TextBox1.Text & "Segment Handle: " & CStr(EventNotifyInfo.NumericInfo) & vbCrLf

' Data element position in error.
TextBox1.Text = TextBox1.Text & "Element Position: " & EventNotifyInfo.StringInfo & vbCrLf
Application.DoEvents()
ElseIf InfoType = EventIDConstants.Event_Info_Error_Composite_Position Then
' Supplemental error has been passed. In this case, the error
' generated has happened in a sub element belong to a composite
' of a segment having the following segment handle.
TextBox1.Text = TextBox1.Text & "Segment Handle: " & CStr(EventNotifyInfo.NumericInfo) & vbCrLf

' Data element and sub element position in error.
TextBox1.Text = TextBox1.Text & "Component Element Position: " & EventNotifyInfo.StringInfo & vbCrLf
Application.DoEvents()
End If
End Sub