aspose file tools*
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
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RecordNotFoundException" Watch "RecordNotFoundException" New topic
Author

RecordNotFoundException

Maksym Odintsov
Greenhorn

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
Bartender

Joined: Sep 13, 2007
Posts: 2527
    
    8

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

I personally implement them as subclass of Exception.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
 
wood burning stoves
 
subject: RecordNotFoundException