Hi developers *and* users,

shall we try to come up with a good Exception design for master?

Currently, the CDK uses a mix of various CDK specific exceptions,
though we officially promote the single use of CDKException. Others
have requested to use more general exceptions, like
IllegalArgumentException.

Today, another user problem came up, a NPE upon missing 2D coordinates
in the renderer, where in fact a IllegalArgumentException may be
appropriate, with a good error message.

I like to discuss this issue, and in particular these three designs:

1. Only CDKException with proper messages (current formal design of
the CDK, which several classes violate)
2. Use CDK-specific, tuned exceptions, such as NoSuchAtomTypeException
(existing already) and Missing2DCoordinatesException
3. Use Java Exceptions only, like IllegalArgumentException with proper messages

There are pros and cons for all of them. Let's try to get them clear first.

Egon


-- 
Dr E.L. Willighagen
Postdoctoral Researcher
Institutet för miljömedicin
Karolinska Institutet (http://ki.se/imm)
Homepage: http://egonw.github.com/
LinkedIn: http://se.linkedin.com/in/egonw
Blog: http://chem-bla-ics.blogspot.com/
PubList: http://www.citeulike.org/user/egonw/tag/papers

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to