File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Developer Certification (SCJD/OCMJD)
find()-method and RecordNotFoundException
Joined: Aug 29, 2007
Jul 29, 2011 01:15:47
DBMain.find method throws a RecordNotFoundException, Shall i through it to indicate no matched records are found, or shall I return an empty array.
Roel De Nijs
Joined: Jul 19, 2004
Jul 29, 2011 02:28:38
mohammad abdellatif wrote:
Shall i through it to indicate no matched records are found
That's what I did. Others just returned an empty array. So both approaches are fine, don't forget to document your decision in choices.txt
, SCJP (
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: find()-method and RecordNotFoundException
[B&S] does update() need DuplicateKeyException
static method inside a abstract class?
implementing interface methods within another interface method
Javadoc: What to document if one exception is caught and another is throwed?
urlyBird 1.2.3 - findByCriteria method
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014