Here's a question about exception handling with a servlet.
I have to catch a certain type of exception based on some type of action but the logging class I have to use (not System.out ; it's proprietary and mandatory). The mandatory logging method (someclass.logging) throws it's own special exception (i.e., loggingException). The compiler complains that it must be caught but how do you catch within a catch?
catch (someException e) {
someclass.logging ("message");
}
Catching within a catch looks really messy.
catch (someException e) {
try {
someclass.logging ("message");
} catch (loggingException le) {}
}
This is done with the doGet method of a servlet so my options are limited. Any ideas?
Start Free Trial