Try catch block

while using try catch activity if any error occured in try block cant it execute finally block.

Pls reformulate your question.
Cheers

  • Try - The activity performed which has a chance of throwing an error.
  • Catches - The activity or set of activities to be performed when an error occurs.
    • Exception - The exception type to look for. Please note that you can add multiple exceptions.
  • Finally - The activity or set of activities to be performed after the Try Catch block whether or not an error occurred.

So in any case the Finally will execute

1 Like

@J0ska - Hi while using Try/Catch block i intentionally wrote the code to occur error without nothing is written in catch block i wrote sample piece of code in finally block but after getting error in try block it is not executed finally block. may i know why

Did you catch the exception in Catch block? If yes attach your workflow

image

Thanks,
Prankur

2 Likes

Hi while using Try/Catch block i intentionally wrote the code to occur error without nothing is written in catch block i wrote sample piece of code in finally block but after getting error in try block it is not executed finally block.Main.xaml (5.2 KB)

This is fine but you need to catch the exception in order to run finally block.

Try this and execute

image

Thanks,
Prankur

2 Likes

@PrankurJoshi - Thank you a lot now i understood completely.

1 Like