try catch __finally

来源:互联网 发布:java web 包结构 编辑:程序博客网 时间:2024/06/06 01:48

try{

  try{
    throw Exception("error!");
  }
  __finally{
    ShowMessage("__finally");
  }

 }

catch(Exception &e){

 

}

会进入__finally,然后进入catch块

 

 

没有这样的形式

try{
    throw Exception("error!");
}
__finally{
    ShowMessage("__finally");
}

catch(Exception &e){

 

}

try{
    throw Exception("error!");
}
catch(Exception &e){
   
}

__finally{

 

}

 

 

原创粉丝点击