I have an activity to click image if it cannot find the image it throws an exception and source field in the exception pop up tells me exactly which image(My Display name) is throwing the exception.But when I catch that exception, exception.source property gives me system.activities as an Output.
So what you are saying is, if we want to have the name of the activity, we need to have all error handling in another workflow, like:
workflow: RUNME
try{
invoke main }
catch all exceptions{
Print activity name}
Is there really not smarter solution?
If not, could there be an option when starting a new project to automatically generate a file with above content?
Hi @badita,
This solution provides us the activity name in which the exception occured.
But if I have multiple files how can I know in which file this exception occured?
Is there any solution for us to know both the below things.
I want to know activity name in which the exception occured
Also I want to know the file name in which the exception occured.
It might be helpful to store like a destination variable before each Invoke, so you know where it is in the process. Then you can use that to know which part of the process failed and attach that with the Source and Message. However, depending on your framework, if your Try/Catch is outside of your entire process, then that destination variable will not get stored through the Arguments since Arguments are not passed in the event of an Exception, unless you maybe store your destination in a file.