Closed arend-von-reinersdorff closed 8 years ago
Thanks for the feedback.
I think section needs a bit of work.
Your link to google plus doesn't work for me - but you are correct that blanket usage of Throwables.propagate isn't right.
I've updated the text in this commit
If you can suggest any improvement please do so.
That was quick! Thanks for the change, very well said :-)
Sorry, it seems I cut off two letters from the link: https://plus.google.com/+googleguava/posts/E2UbsJEUUzk
Regarding the handling of checked exceptions https://ncrcoe.gitbooks.io/java-for-small-teams/content/style/900_avoid_checked_exceptions.html
The Guava Team recommends using Throwables.propagate() only for Exception and Throwable. In this case it is unknown if the throwable is checked and must be wrapped or if it is unchecked and can be rethrown directly. Eg
Known checked or unchecked exceptions can be handled directly, eg
See Removable Throwables.propagate calls https://plus.google.com/+googleguava/posts/E2UbsJEUU