You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Apache Wiki <wi...@apache.org> on 2010/01/15 19:42:42 UTC

[Httpcomponents Wiki] Update of "CodingConventions" by TonyPoppleton

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpcomponents Wiki" for change notification.

The "CodingConventions" page has been changed by TonyPoppleton.
http://wiki.apache.org/HttpComponents/CodingConventions?action=diff&rev1=2&rev2=3

--------------------------------------------------

   * In very rare cases it may be approriate to ignore an exception, in which case document it clearly.
   * TODO is there a custom HTTP client exception that is used?
   * Handle exceptional conditions by throwing an exception and not, for example, returning null from a method.
-  * Prefer unchecked exceptions (like RuntimeException) over checked exceptions.  Only use checked exceptions if it is expected that the caller can handle it or recover from it.  Unchecked exceptions will just be propagated back to the general exception handler, which is ideal.
+  * Prefer unchecked exceptions (like RuntimeException) over checked exceptions as per [http://www.oracle.com/technology/pub/articles/dev2arch/2006/11/effective-exceptions.html].  In summary, only use checked exceptions if it is expected that the caller can handle it or recover from it.  Unchecked exceptions will just be propagated back to the general exception handler, which is ideal.
  }}}
  
  == Collections ==

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org