请问为什么这道题的输出是这个??

分析以下程序的执行结果。[
#include
using namespace std;
class MyException { };

void testFun(int test) ;

int main()
{

try{

   for(int i=0; i<3; i++)

   testFun(i);   
   cout << "in try"<<endl;
} 

    catch(...) 
    { 
    cout<<"catch all "<<endl;
    }

cout << "End"<<endl;

return 0;
}

void testFun(int test) {

try{
    if(test==1) throw MyException();
    if(test==2) throw "Error!";
    cout<<"In testFun "<<endl;
    } catch(char*) { cout<<"catch char* "<<endl;
    } 

catch(MyException&) { cout<<"catch MyException "<<endl;

}

}

图片说明

首先,因为for循环有丢出异常
因为test == 0,所以第一次会输出
In testFun 
第二次丢出MyException();
输出catch MyException 
第三次丢出if(test==2) throw "Error!";没有被testFun接住,所以被主程序接住
cout<<"catch all "<<endl;
因为主程序catch了,所以cout << "in try"<<endl;不会运行
而是走到最后,输出
cout << "End"<<endl;