Hi,
Need to capture runtime error into a variable.
Wanted write that variable into log file. Tried Get last error option, but no use.
Could anybody provide solution.
Thanks,
Raghavendra CH
@rchilakalapu You can use onblock error new feature Capture Unexpected logic errors to capture Run time errors along with Get Last error action to capture run time errors.
In the below example i am trying to close browser which is not initialized.
I have configured to go to end of the block in on block error, also I have enabled capture unexpected logic errors.
So the flow control will go to end of the block whenever if fails with runtime error.
we will use the Get last error action to retrieve the run time error.
I hope the above helps you.
Thanks for the reply.
I have tried option but not successful.
Here is the snippet of my flow.
Flow is to open edge browser, wait for some text for specified time(20sec).
Run time error is thrown 'Timeout error".
Trying to capture following timeout error:
but not successful.
Could you @Rkv_ please provide more inputs.
Thanks,
Raghavendra CH
1 )if you have set timeout, increase the time from the default value
2) use "wait for web page content " action
When you say the "Get Last Error" option didn't work, could you explain how you have the "On Block Error" configured and the "Get Last Error"?
In order for this to work, you should use the "On Block Error" action and set "Continue flow run" instead of "Throw Error", This setting will allow the Flow to continue and still record the error. Depending on the type of error, you may want to enable "Capture unexpected logic errors" too. After this "On Block Error" has run, use the "Get Last Error" action. See my example:
Exception handling mode "Go to end of block" will exit the block as soon as an error occurs.
My Error was captured in the %LastError% Flow variable.