Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URLyBird: Oppugn DuplicateKeyException.  RSS feed

 
Mellon Sun
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My assignment is URLyBird 1.32.
The instruction say:


Obviously, I need to find a right recNo as the return value for create().
And, I don't think I need a "Key" because I think I am using the recNo as the "Key".

So, how can I throw a DuplicateKeyException?
[ January 31, 2006: Message edited by: sun mellon ]
 
B Chen
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method signature means you are allowed to throw DuplicateKeyException. Does not mean you are required to throw DuplicateKeyException.
If you designed or implemented it in a way that such exception never happens, then you won't need to throw it.
 
Mellon Sun
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see, thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!