How to apply Exception handling

Hi,

I have two workflows. I want that whenever any error ocurrs it should update excel as error ocurred. How do I apply Exception handling.

For individual workflow, do I need to apply Exception handling. What about throw and rethrow.

Hi @garima.sriv12

In each workflow use Try-Catch activity

Try
  - Your main workflow logic
Catch ex As Exception
  - Write "Error Occurred" to Excel using Write Cell Workbook activity
  - (Optional) Rethrow if you want the parent to know about the error
End Try

Hope it helps!!

Hi @garima.sriv12

Best Practice using Try-Catch-Finally for Workflow Invocation and Excel Status Updates

Use Try-Catch Activity

Try Block - use to build your actual logic (invoking your flows)
Catch Block - use to handle the exception. (what need to do if exception occurs)
Finally Block - this block will execute irrespective of success or failed. (So handle your mandatory steps on the execution here)

Example
Design in Try-Block

Design in Catch-Block

Design in Finally-Block

Thanks,
Chethan

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.