Try catch

activities

#1

will try-catch block will catch all the exceptions if I give system.exception in catch???


#3

but its not catching this error

{
“message”: “Append line : Object reference not set to an instance of an object.”,
“level”: “Error”,
“timeStamp”: “11:49:19”,
“fileName”: “Dummy_Refresh-Flow”,
“jobId”: “7a206ad6-3761-4594-b1bf-16b6f00cf212”
}


#4

Hi,
If you don’t know what type of exception to catch then you could do this simple step.

  1. you get to know the exception type by error window (eg :ArgumentException)

exeptionmsg

  1. Then in catch block browse the type of exception to be handle.

exceptionType


#5

okay Thank you .If I give more than two catches in single try will it work ??
will it impact the workflow ??


#6

Yes .
That’s why UiPath named as catches :stuck_out_tongue:
I don’t think any impact would happen on workflow.
more over …