Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RecordNotFoundException

 
Maksym Odintsov
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3521
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
take a look at this for whether these exceptions should be subclass of RuntimeException or not.

I personally implement them as subclass of Exception.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic