Reusable Component Exception Handliing

What is the best way to handle exceptions of reusable components (within the component or where it is utilized.)

I have a step (clicking on the hyperlink) in my project for which creating a reusable component. Where should I handle the exceptions?

Also, please share other best practices/things to consider while developing reusable components.

Thanks for the help!

Hi @Vinodkumar_Kalkumbe ,

I will suggest to use try catch block on component level and try to rethrow exception from catch block.
If you are creating large components library better to handle each exception their itself.

Key Steps:

1 - Proper naming convention of library and their components.
2 - Give Proper Annotation ton top layer.
3 - If multiple people working on same libraries always take care of dependencies because that’s create issues sometime better to have same version dependencies at both place in lib and in your project.
4 - No required declare arguments with in_ and out_ in components as they automatically reflects on the basis of direction in property window after publish.
5 - Proper versioning should be maintained.
6 - Always take care when moving code from one Environment to other the libraries should exist.
7 - Each component should be in try catch block.
8 - Better to make some xaml files private which is not really required to show up to other developers.

Thanks.

1 Like

This is what I was looking for (a very clear and concise answer).

Thank you so much for your help.

Happy Automation.

1 Like

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