This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLyBird DBAccess exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "URLyBird DBAccess exceptions" Watch "URLyBird DBAccess exceptions" New topic
Author

URLyBird DBAccess exceptions

Mike Ngo
Ranch Hand

Joined: Oct 16, 2006
Posts: 89
For readRecord(), updateRecord(), deleteRecord(), I rethrow IOException as RecordNotFoundException.
I am not sure how to handle IOEception exceptions for createRecord(). It only throws DuplicateKeyException (which never occur given the specs).
Swallowing the IOException is bad but rethrow it as DuplicateKeyException is not correct. Any idea?
Rodrigo W Bonatto
Ranch Hand

Joined: Aug 20, 2004
Posts: 62
Hi,

Maybe you can catch the IOException and swallowing it in a new class that extends RuntimeException.
[ November 08, 2006: Message edited by: Rodrigo W Bonatto ]

SCJA, SCJP, SCJD, SCWCD, SCBCD5, SCDJWS, SCEA5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URLyBird DBAccess exceptions
 
Similar Threads
IOException in Data idea, pls comment
B&S DBMain -- New Exceptions?
Handling IOException in Data Accessing
Propagating exceptions to client
RecordNotFoundException and DuplicateKeyException