The event handler that gets called when an error or other notable incident has occurred in Framework EDI.
Syntax:
<Object>_EventNotify(<EventNotify Object>)
Parameters:
Example:
The following is an example that shows how to listen to notifications, warnings and errors from FREDI.
' Set up FREDI to receive events in the module
Private WithEvents m_oEdiDoc As ediDocument
:
' In the main routine start an instance of FREDI
m_oEdiDoc = New ediDocument
:
:
' This is an event handler for EventNotify that captures all errors discovered
' by FREDI.
Private Sub m_oEdiDoc_EventNotify(ByVal EventNotify As Edidev.FrameworkEDI.ediEventNotify) Handles m_oEdiDoc.EventNotify
If EventNotify.Severity = EventIDConstants.Event_Notify ThenEnd Sub
' Any general notifications sent by FREDI is captured here.ElseIf EventNotify.Severity = EventIDConstants.Event_Warning Then
TextBox1.Text = TextBox1.Text & "Code: " & CStr(EventNotify.ErrorCode) & ", Notification: " & EventNotify.ErrorDescription & vbCrLf
Application.DoEvents()
' Any warnings sent by FREDI is captured here.ElseIf EventNotify.Severity = EventIDConstants.Event_Severe Then
TextBox1.Text = TextBox1.Text & "Warning Code: " & CStr(EventNotify.ErrorCode) & ", Warning Description: " & EventNotify.ErrorDescription & vbCrLf
Application.DoEvents()
' Any severe errors sent by FREDI is captured here.End If
TextBox1.Text = TextBox1.Text & "Severe Code: " & CStr(EventNotify.ErrorCode) & ", Severe Description: " & EventNotify.ErrorDescription & vbCrLf
Application.DoEvents()