开发者

Dealing with exceptions examples [closed]

开发者 https://www.devze.com 2023-04-11 02:22 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

May someone point me to an opensource project or a book or a site or any tips whatsoever for "good practices" in deal开发者_如何学运维ing with exception - e.g. retrying the offending code or any other accepted strategy.


  • Exception Antipatterns
  • 10 best practices


There's an entire chapter in Joshua Bloch's Effective Java dedicated to effective use of exceptions. This book comes highly recommended for any professional Java developer. I suggest that your purchase it (hehe..excuse the sales pitch).


In addition to Effective Java, there's an entire book dealing with exception and error handling in Java.


I liked this article: http://blogs.msdn.com/b/codeanalysis/archive/2006/06/14/631923.aspx

It's about a code analysis tool which complains about catching general exceptions. But it also describes pretty well how exception handling should be done in the right way.


Joshua Bloch's Effective Java: Programming Language Guide (Addison-Wesley, 2001) has a chapter dedicated to exception handling.

0

精彩评论

暂无评论...
验证码 换一张
取 消