January 22, 2017

[HDGEM] Eight guidelines of exception handling In Java

In Joshua Bloch's book, Effective Java, he described these eight guidelines of exception handling:
  1. Use exceptions only for exceptional scenarios.
  2. Use checked exceptions for recoverable conditions and runtime exceptions for programming errors.
  3. Avoid unnecessary use of checked exceptions.
  4. Favor the use of standard exceptions.
  5. Throw exceptions appropriate to the abstraction.
  6. Document all exceptions thrown by each method.
  7. Include failure-capture information in detail messages.
  8. Don't ignore exceptions.


--
Posted By Blogger to HDGEM at 1/22/2017 02:39:00 AM
Post a Comment

Featured Post

Updated Coupons / promo codes for Google Apps for Work / Business

To redeem: 1. Sign up for Google Apps   2. Go to your billing settings  3. Choose your payment plan  4. Enter your promo code ...