Framework EDI Reference. Events
ediDocument. EventNotify

The event handler that gets called when an error or other notable incident has occurred in Framework EDI.

Syntax: 

Parameters:

Example:

The following is an example that shows how to listen to notifications, warnings and errors in FREDI.

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

         :

         :

' This is an event handler for EventNotify that captures all errors discovered
' by FREDI.
Private Sub m_oEdiDoc_EventNotify(ByVal Severity As Fredi.EventIDConstants, ByVal ErrorCode As Long, ByVal ErrorDescription As String)
   If Severity = Event_Notify Then
      ' Any notifications sent by FREDI is captured here.
      Debug.Print "Code: " & CStr(ErrorCode)
      Debug.Print "Notification: " & CStr(ErrorDescription)

   ElseIf Severity = Event_Warning Then
      ' Any warnings sent by FREDI is captured here.
      Debug.Print "Warning Code: " & CStr(ErrorCode)
      Debug.Print "Warning Description: " & ErrorDescription

   ElseIf Severity = Event_Severe Then
      ' Any severe errors sent by FREDI is captured here.
      Debug.Print "Severe Code: " & CStr(ErrorCode)
      Debug.Print "Severe Description: " & ErrorDescription

   End If
End Sub