Question

VBS- Function throwing "Bot Error"

  • 20 April 2023
  • 4 replies
  • 345 views

Userlevel 1
Badge +6

How to do error handling in manual VB script in A360 in case of error Output variable storing value as “Bot error”


4 replies

Badge +1

Hi @RajeshS106234 

You can either use error handler in VB Script (On error resume next) or u can handle the output of VB Script code by checking the output variable.

Badge

Hello @Narendra 5601 -

I tried using (on error resume next) and tried to return the err.description, but it wont return the script error message but “bot error”.I needed the actual error message for further actions.

Ganesh

Userlevel 3
Badge +6
Function FunctionName(argList)
On Error Resume Next
'Rest of the function logic here

If Err.Number <> 0 Then
FunctionName = Err.Description
Err.Clear
End If
End Function

@Ganesh.G5  Try this way.

Badge

@Sumit.K7 

Hello Sumit, thanks for the help, it works well.

Reply