SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
If your code throw FileNotFoundException and SocketException, then you should wrap both of them in an IOException passing the oppropriate message.
SCJP 1.4, SCJD
SCJP 1.4 (91%)<br />SCJD 1.4 (376/400, 94%)
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
Originally posted by Simon Quirke:
Hello JavaRanch,
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?
Many thanks
Simon
Anton Golovin (anton.golovin@gmail.com) SCJP, SCJD, SCBCD, SCWCD, OCEJWSD, SCEA/OCMJEA [JEE certs from Sun/Oracle]
SCJP 1.4 (91%)<br />SCJD 1.4 (376/400, 94%)
Originally posted by Robert Konigsberg:
If your exceptions inherit from a common base then the catch() clauses become simpler.
Seriously Rick? Seriously? You might as well just read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|