Redian新闻
>
想破脑壳也不知道为什么finally不执行
avatar
c*t
2
在如下的代码中,finish try block, caught exception or in finally block 没有
一个
执行的.myEventDlg 倒是执行完毕.
try
{
Trace("in try block");
if( myEventDlg != null )
myEventDlg(this, myEventArgs);
Trace("finish try block");
}
catch(Exception ex)
{
Trace("caught exception: " + ex.ToString();
}
finally
{
Trace("in finally block");
}
...
public delegate void MyEventHandler( object sender, MyEventArgs e);
..
myObj.MyEventRaised += new MyEventHandler(this.MyEvent_Handler);
private void
avatar
c*t
3
seems CLR can't find finally block? Googled "StackOverflowException" can
cause
this, but catch block couldn't be found either, so frustrated

【在 c**t 的大作中提到】
: 在如下的代码中,finish try block, caught exception or in finally block 没有
: 一个
: 执行的.myEventDlg 倒是执行完毕.
: try
: {
: Trace("in try block");
: if( myEventDlg != null )
: myEventDlg(this, myEventArgs);
: Trace("finish try block");
: }

avatar
c*t
4
resolved by compiling the code on win 2003 server. I used to compile code on
XP then copy binaries over. Since MS last update MS08-67, this approach se
ems not always good.

【在 c**t 的大作中提到】
: seems CLR can't find finally block? Googled "StackOverflowException" can
: cause
: this, but catch block couldn't be found either, so frustrated

avatar
k*r
5
sounds like a bug somewhere

on
se

【在 c**t 的大作中提到】
: resolved by compiling the code on win 2003 server. I used to compile code on
: XP then copy binaries over. Since MS last update MS08-67, this approach se
: ems not always good.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。