ijaz5
8 years agoOccasional Contributor
Error Event (GeneralEvents_OnLogError) wont trigger on VB script Runtime error
I am trying to call some function or do any event actions when 'Microsoft VBScript runtime error' occur in log .
GeneralEvents_OnLogError(Sender, LogParams) works fine when any sort of error occurs in script but how could I know that which error has caused run time error or when 'Microsoft VBScript runtime error' or 'Script execution was interrupted' is posted to the log.
I want to call some other function when 'Microsoft VBScript runtime error' or 'Script execution was interrupted' is posted to the log.
Below is my code in which IF statment never go TRUE:
Sub GeneralEvents_OnLogError(Sender, LogParams) Err.Clear On Error Resume Next If LogParams.MessageText = "Microsoft VBScript runtime error." or LogParams.MessageText = "Script execution was interrupted."then Sys.Process("iexplore").Terminate() Delay(2000) Call Authenticated_login.Authenticated_login(1) end if End Sub
Error I want to catch is also attached.