[ajug-members] Checked vs. Unchecked Exceptions

Dan Marchant driedtoast at gmail.com
Tue Jun 27 07:49:50 EDT 2006


Goes a bit in line with the debate of Exceptions being used for business logic.

In practice, I would used Checked exceptions in API development so you
know the outcomes of the API and can react accordingly.  A web
application needs to catch and react to exceptions at some point to
direct the user appropriately. So my opinion is that Checked
Exceptions allow you to react a bit easier in a team development to
exceptions within the system developed by other parts of the team.

Sometimes wish the Number parsing exception (NumberFormatException)
within the JDK was a Checked Exception but oh well.

Checked Exceptions will also show up in most IDEs and let you either
allow it to pass by adding a throws or to catch it to react to it.
Unchecked Exceptions are like mystery meat and should only be used for
major issues such as DB connection cannot be obtained, system ran out
of memory, or any other no reactable situations that is my opinion.

Thoughts?

- Dan

On 6/26/06, Justin Fiore <justin.fiore at gmail.com> wrote:
> Hello All,
>
> I am interested in your opinions of the Checked vs. Unchecked Exception
> debate.
>
> Any answers can be from a theorhetical or conceptual standpoint (excluding
> any language specific implementations), or concrete, and or practical
> scenarios.
>
> If this has already been discussed, please direct me to the discussion.
>
> Thanks,
>
> --
> Justin Fiore
> justin.fiore at gmail.com
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members
>
>
>



More information about the ajug-members mailing list