Let's say I have codes like this:
try{
doTaskA();
doTaskB();
doTaskC();
} catch(MyException $e){
fixMyException();
}
When doTaskA() throws MyException, I want the program to go through fixMyException(), then it goes back and continues executing doTaskB() and doTaskC(). Is it possible?
The same thing should apply to other tasks, i.e. all doTaskA/B/C() may throw the same exception, and I want the program can go on to the unfinished tasks every time after it executes fixMyException()..
Is there any thing like "continue" or "resume" function in the exception handling?
I have checked the PHP manual but it seems such control structure doesn't exist. If so, what's the best practice to design the program that can do what I want? (Supposed I have over 10 taskes inside the try block).