posted 18 years ago
Hi all,
In my implementation of suncertify.db.DBAccess some of the methods contain synchronized code, and in some places I use the Object.wait() method that throws InterruptedException which is a checked exception. Also I call methods of RandomAccessFile that throw IOException - checked as well.
On the other hand the interface allows only RecordNotFoundException, SecurityException and DuplicateKeyException to be thrown from some of the methods. IMO none of them is a good choice to chain the InterruptedException or IOException in.
To workaround this I created a new exception type - DataRuntimeException that extends RuntimeException, and by definition can be thrown from any method.
Is this a good solution from the design point of view??
Cheers
Krzysiek
[ September 22, 2005: Message edited by: Krzysiek Hycnar ]