try、catch能不能嵌套使用
这种格式对吗?
try
{
//dosomething
}
catch
{
try
{
//doothersomething
}
catch
{
}
}
这种格式对吗?
try
{
//dosomething
}
catch
{
try
{
//doothersomething
}
catch
{
}
}
2006-08-15 17:20
2006-08-15 17:29
2006-08-15 17:33
可以是可以,只是没有必要
try块本来就对块中的所有代码进行检测
catch块一般是写入对异常处理的代码,还需要try?
2006-08-15 20:54
2006-08-16 13:07