If your code throw FileNotFoundException and SocketException, then you should wrap both of them in an IOException passing the oppropriate message.
Originally posted by Simon Quirke:
I've been plugging away on the SCJD project for a fair while now, and while I've found JavaRanch invaluable, this is my first post.
I'm doing Bodgitt and Scarper and in my suncertify.db package have the Data class as well as a DBAdapter which implements a DBClient interface.
In the DBAdapter class I have the following declaration....
My question is, am I throwing too many exceptions? Should I be wrapping some of these (ie BookingException, RecordNotFoundException, DBRecordException, SecurityException) in a DBClientException or similar?
Originally posted by Robert Konigsberg:
If your exceptions inherit from a common base then the catch() clauses become simpler.