permaculture playing cards*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RecordNotFoundException 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 "RecordNotFoundException" Watch "RecordNotFoundException" New topic


Maksym Odintsov

Joined: Jan 22, 2009
Posts: 11
Hi. How do you think is it possible to make RecordNotFoundException and DuplicateKeyException subclasses of RuntimeException ?
I don't have any specification according to how to implement this two exceptions.
I want to do it, because in this way it will be easier to implement my server.
I have DataRemote interface which extends Remote and DB, my DataImpl class implements DataRemote. It means that I can treat DataImpl as DB.
But I can't throw any checked exceptions except RemoteException inside the methods of DataImpl class.

please help me solve this problem.
K. Tsang

Joined: Sep 13, 2007
Posts: 2247

take a look at this for whether these exceptions should be subclass of RuntimeException or not.

I personally implement them as subclass of Exception.

I agree. Here's the link:
subject: RecordNotFoundException
Similar Threads
NX: URLy Bird 1.3.1 Explicit Fatal Exception Handling
DBMain method need throw RemoteException?
NX: DBAccess and RemoteException
GuiController design
RMI and Adapter Pattern for URLyBird