Multibit-Legacy / multibit-hd

Deprecated Bitcoin Wallet
https://multibit.org/blog/2017/07/26/multibit-shutdown.html
Other
169 stars 124 forks source link

Catch Exception instead of Throwable #848

Closed AymanDF closed 8 years ago

AymanDF commented 8 years ago

This pull request is focused on resolving occurrences of Sonar rule squid:S1181 - “ Throwable and Error should not be caught”. You can find more information about the issue here: https://dev.eclipse.org/sonar/rules/show/squid:S1181 Please let me know if you have any questions. Ayman Abdelghany.

gary-rowe commented 8 years ago

Thank for taking the time to create this pull request.

Unfortunately, I'm going to have to reject it on the basis that although Sonar kicks it out as suspicious it is in there as a Throwable for a specific reason: it is the final error handling code that must catch everything (including Error) and offer the user a chance to upload an error report indicating what went wrong before bombing out.

See http://stackoverflow.com/a/2274116/396747 for further rationale.

Please don't be disheartened by this, we do welcome input of this kind.