I understand that we should reserve try/catch for those cases where errors are unpredictable. However, in my case, SharePoint does not provide a good API to detect whether an SPGroup object exists or not, hence, I am using try/catch.
In the below code, I may get an exception in some cases while creating adminGroup object. However, this entire code block is a value-added service and I do not want end user to be neither interrupted nor notified about this exception. Is this a good way of handling the situation with an empty catch?
try { SPGroup adminGroup = web.SiteGroups[groupTitle]; if (!adminGroup.AllowMembersEditMembership) { adminGroup.AllowMembersEditMembership = true; adminGroup.Update(); } } catch { }