假设我们有一个由非托管 C++ 应用程序调用的 C#。来电者代码不可用。
public void MethodCalledByUnmanagedCode()
{
try
{
DoWork()
}
catch {}//assume we swallow exception, no logging or anything
}
在这种情况下,在任何情况下是否有任何方法可以让任何异常冒泡到非托管 C++?
最佳答案
您的代码可能引发 ThreadAbortException
.
ThreadAbortException is a special exception that can be caught, but it will automatically be raised again at the end of the catch block.
关于c# - 如果捕获一般异常,是否有可能出现异常?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11171732/