Robotic Process Automation (RPA)

Robotic Process Automation (RPA)

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Handle Error not execute subroutine

    Posted 07/25/22 03:21 PM

    The OnError command is not triggering any subroutines.


    I put the OnError at the beginning of the subroutine.
    It should trigger a subroutine if an error occurs in "Requests".
    But "ErroRequests" is never triggered, how can I make OnError execute the "ErroRequests" subroutine if there is an error in the "Requests" subroutine?

    ------------------------------
    João Pedro Alcântara
    ------------------------------


  • 2.  RE: Handle Error not execute subroutine

    Posted 07/25/22 10:33 PM
    Hi João, here's an example:

    goSub --label Requests
    beginSub --name Requests
    	onError --label ErrorRequests
    	failTest --message "Forcing an error"
    endSub
    beginSub --name ErrorRequests
    	logMessage --message "#Routine [${wdg:subName}]\r\nLineNumber: ${wdg:error.LineNumber} \r\nCommand: ${wdg:error.Command}\r\nMessage: ${wdg:error.Message}\r\nRoutine: ${wdg:error.Routine}" --type "Info"
    endSub​




    I hope I was helpful 



    ------------------------------
    Angelo Alves
    WW Elite Team IBM RPA
    ------------------------------