aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Propagating exceptions to client
B&S DBMain -- New Exceptions?
IOException in Data idea, pls comment
RecordNotFoundException and DuplicateKeyException
Handling IOException in Data Accessing