Closed georgekankava closed 8 years ago
Thank you for pointing a smelly code. For sure it should be refactored.
Introducing a new class does not give any useful information to the client code, other than an indicative exception name.
First we have to answer question. What action can the client code take when the exception occurs? We are referring to read only internal resource, if exception happens user cannot do anything. Possible options:
@mgolokhov I will update it tomorrow. Thanks
@mgolokhov PR Updated. As you mentioned I just removed throwing exception and left logging.
Merged and squashed with refactored version as one commit. Thank you.
This pull request is focused on resolving occurrences of Sonar rule squid:S00112 - Generic exceptions should never be thrown. This pull request removes 40 minutes of technical debt. You can find more information about the issue here: https://dev.eclipse.org/sonar/rules/show/squid:S00112 Please let me know if you have any questions. George Kankava