Unsure what am i doing wrong for try catch block

Hi, I am doing a process where by the general gist is filling up a shipment form for my company.

I am trying to use try catch block to catch the errors and send a notification to myself. I have inserted the exceptions and activity in try but it doesn’t seem to be working as whenever there is an error in the sequence, it doesn’t trigger the expections and do the actions I expected.

ive attached some screenshots. please send some help :frowning:


this is the screen whenever there is an error


this is my workflow

thank you!!!

1 Like

I think there is no exception
Kindly run in debug mode and let’s check whether it is showing any exception or not
Or
If we want to explicitly throw a exception along the sequence in TRY BLCOK use a THROW activity with a exception like this
New BusinessException(“error”)
So that it will throw exception inside the TRY block and goes to CATCH Block

Cheers @Lydia

The exceptions is set to IOException , please use Exception instead of IOException and try again.

Hi, I only have 1 IO exception, will it affect the rest ?

Hi, I tried in Debud mode however I obersved no change in anything

we can use System.Exception in the catch exception type which will cover almost most of the exception
Cheers @Lydia

You can add another catch with just Exception.

Hi, I have just tried it however it still doesn’t show what I want. I am really not sure what I am doing wrongly…

hi, sorry what is just exception?

image

1 Like

Hi this worked ! I also realized I have been running it on debug mode so it doesn’t trigger thetry catch activity;;;; but thanks !

1 Like

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