try
{
try
{
throw new Exception("From Try");
}
catch
{
throw new Exception("From Catch");
}
finally
{
throw new Exception("From Finally");
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
上述代码的输出结果是:
From Finally
。为什么不是
From Catch
呢?或者说,我如何在外部捕获并记录两个异常?