code like
*************
public void
test() throws Exception {
.... // have a variable "sToken"
while(sToken.hasMoreTokens()) {
handleToken(sToken.nextToken().toString())
}
}
public void handleToken(
String s) {
try {
// do something using input "s"
} catch(Exception e) {
e.printStackTrace();
}
}
**************************
Question -- When I loop through "while", if the first token I pass encounters some exception in "handleToken" method, then I can not
handle the second one. What I like is if one token gets exception, just record it and move on to the next token.
How can I do that ?
Thanks.