I have a problem with methods from a Data class :
public
String[] read(int recNo) throws RecordNotFoundException;
public void update(int recNo, String[] data, long lockCookie)
throws RecordNotFoundException, SecurityException;
public void delete(int recNo, long lockCookie)
throws RecordNotFoundException, SecurityException;
public int[] find(String[] criteria);
public int create(String[] data) throws DuplicateKeyException;
public long lock(int recNo) throws RecordNotFoundException;
public void unlock(int recNo, long cookie) throws RecordNotFoundException,
SecurityException;.
They can throw only specified exception. What should I do with caught exceptions inside this methods(which are in throws declaration)? For example create method can throw only DuplicateKeyException, but inside it can appear IOException. Throwing a DuplicateKeyException is ridiculous and I can�t do nothing (leave empty catch). Do you have any idea what to do? Please help me.