Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
Nope: there is no ON ERROR RESUME or ON ERROR GOTO (thankfully, in the case of the latter) in CF.
The only way you can do it is the second way you yourself describe.
--
Adam