Exception handling question
Hi all,
I have the following script:
try{
doProcess1();
doProcess2();
doProcess3();
}
catch{
processException();
}
Is there a clean way to rewrite this script such that when there is an exception in doProcess1(), the control flow is returned to doProcess2() after the exception is handled?
In other words, I want to do like below, but perhaps in a cleaner way?
try{
doProcess1();
}
catch{
processException();
}
try{
doProcess2();
}
catch{
processException();
}
try{
doProcess3();
}
catch{
processException();
}
Thank you!
