Try catch for multiple activities

I were tried to catch exceptions from multiple activities
but when I tested, it does not work as my expectations.

any recommendations for using try-catch for multiple activities?

Hi @mountie

Could you share the workflow screenshots. Have you surrounded the multiple try catches within a single try catch then it won’t catch the exception.

Regards

@mountie

You just need to keep all the multiple activities into one single try catch…then any activity fails the catch would be activated

Hope this helps…if not a little more explanation or some screenshot about your process would help

Cheers

I did. understood. Single try catch. got it.
thanks

my global try catch workflow
스크란샷 2023-12-25 17.31.35

스크란샷 2023-12-25 17.32.50

but it does not catch the exception.

do I need to put try-catch on depth 1?

@mountie

Is the click activity inside the try block?

Or the invoke code of that click is inside try catch?

If yes then it will go to the respective catch

Cheers

yes. multiple click activities.

what is respective catch? I can not find those activity at StudioX (the community version of Studio)

Hi @mountie

Add another catch as system exception and it will be the default exception so what ever the exception occurred it will be catched into that.

Regards

@mountie

You added multiple catches right…so basically each catch block catches specific type of exceptions specified

Are you on studio or studiox?

And studiox is not community version of studio…

Cheers

now only one try-catch globally.
using StudioX.

I’m now testing with System Exception regenerating the exception


failed

Hi @mountie

Have you placed the system exception and did it worked?

Regards

I did but does not work.
unable to catch exception.

@mountie

I just tried in studioX and try catch is workign as expected

Can you show your workflow

cheers

Hi @mountie

Check out this video about error handling in Studio X.

Regards

too many activites (over 100?)
13 groups.
each group have 10 ~ 20 activites.

this video does not help.
per-activity level try-catch works well.
global try-catch does not work.

Hi @mountie

Can I know what you have mentioned within the global and within try catch handlers

Regards

parts of workflow




when I put try-catch on single activity, it works well.
but exception handling became very difficult for hundreds activities.
so I tries to global (means one single try-catch for all activities) try-catch.
but when I put all activities to A try-catch, unable to catch exceptions with System.Exception or specific exceptions aswell.