This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell 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


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
 
GeeCON Prague 2014
 
subject: URLyBird DBAccess exceptions