Catch every error inside a workflow


#1

Hello friends,
how is it possible to catch every kind and possible error that can happen inside a workflow, which is invoked using the Invoke Workflow activity?
Sometimes it doesn’t find an element due to a delay in the upload of the page.
Thank you so much,
Camilla.


#2

Hi @CamiCat,

Use try catch activity.

In catch Block you can get all kind of exceptions
System.Exception

You can print the error message using exception.Message.Tostring()
exception.Source.Tostring()

Regards,
Arivu


#4

Thank you so much @arivu96.
Where I should put the try catch activity: in the Invoke Workflow activity or in the workflow inside it?
Thank you so much.
Camilla


#5

Hi @CamiCat,

You can put out side of in your invoke workflow.

Where you are inheriting there use the try catch Block.

In try block inside put invoke workflow
In catch Block you can get the exception message.

Refer this post too

Regards,
Arivu