Hi,
From experience it is good practice to handle all exceptions inside the process, and not in the objects (VBOs).
1) It makes solutions easier to maintain, as you would be sure that you are handling errors and recover from them inside process.
2) Objects should be reusable and should not have any business logic inside otherwise it will be messy.
3) Each object page should be responsible only for single action -
Single Responsibility Principle (Pattern) And few words about your situation: sending emails from inside the object. You can have one object like: Email Client or Email Utility with several pages, get inbox, send mail and others.
And you can use and reuse these actions in many other processes.
So if any process breaks, while trying to click some element, catch this error in the process and use another object to send the notification.
Because object which is clicking, should not support mail sending
🙂 and vice versa.
Hope that will help a little bit on implementing better solutions!
------------------------------
Dmitrij Mamajev
RPA Developer
Volvo Cars
Gothenburg - Sweden
------------------------------
Kind regards,
[FirstName] [LastName] [Designation]
[JobTitle]
[CompanyName]
[City] [State]
[Phone]