This code is for continuing the execution after an exception, and this is ugly:
int step=0;
do{
try{
switch(step)
{
case 0:
step=1;
methodAAAAACanThrowException();
break;
case 1:
step=2;
methodBBBBBCanThrowException();
break;
case 2:
step=3;
methodCCCCCanThrowException();
break;
//....
//more and more
//....
case 25:
step=26;
methodZZZZZCanThrowException();
}
}catch( Exception ex)
{
Logger.getLogger(ABC.class.getName()).log(Level.SEVERE, null, ex);
}
}while(step<26);
}
but writing a single try-catch loop for every call, seems even uglier..
Is there any other more elegant option for doing that? thanks