PROPOSAL: Unchecked Exceptions as Subclasses of Checked Exceptions (original) (raw)

Stephen Colebourne scolebourne at joda.org
Wed Mar 25 16:10:53 PDT 2009


Alan Snyder wrote:

Unchecked Exceptions as Subclasses of Checked Exceptions public class TheCheckedException extends Exception {};

public class TheUncheckedException extends TheCheckedException implements UncheckedException {};

I like the idea.

I'm not sure if its actually feasible. I suspect that its more complex than it seems.

I'm also not sure whether there are that many real use cases. Most of the time you control your exception hierarchy (so you can choose unchecked) or you have to live with a published API (the JDK) and so it can't be changed.

Stephen



More information about the coin-dev mailing list