如果您在try catch块中包装对HttpResponse.End的调用,则ThreadAbortException将自动重新引发。即使您将try catch块包装在try catch块中,我认为情况仍然如此。
我没有实际应用程序需要完成相同的事情,该怎么办?
我没有实际应用程序需要完成相同的事情,该怎么办?
namespace Program
{
class ReJoice
{
public void End() //This does not automatically re-raise the exception if caught.
{
throw new Exception();
}
}
class Program
{
static void Main(string[] args)
{
try
{
ReJoice x = new ReJoice();
x.End();
}
catch (Exception e) {}
}
}
}