• Post Reply Bookmark Topic Watch Topic
  • New Topic

B& S DB unlock method signature

 
Rod Abreu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't understand why the unlock method must throw RecordNotFoundException.
My unlock signature looks like this:
public void unlock(int recNo, long cookie) throws RecordNotFoundException,
SecurityException;

Can someone help on this issue?

Tks,
Rod.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you see no reason to ever throw it then don't...
It's there for if you want it. You might for example check whether a record exists before trying to unlock it (mind I don't advise you do, it makes some things a lot more complex).
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!