C++ cli 如何摆脱在调试模式下确实正确处理的缓慢sehexception?

C++ cli 如何摆脱在调试模式下确实正确处理的缓慢sehexception?,c++-cli,C++ Cli,我的应用程序必须调用本机第三方DLL。为此,我在C++/CLI中编写了一个代理DLL,它将调用委托给非托管DLL并封送结果。DLL供应商决定在其非托管对象中的值未定义且被查询时引发异常。我不想对流控制使用异常,所以我将其包装成一个可空的,如下所示: Nullable<int> NativeThirdPartyThingProxy::SomePropThatMayBeUndefined::get() { try { return Nullable<int&

我的应用程序必须调用本机第三方DLL。为此,我在C++/CLI中编写了一个代理DLL,它将调用委托给非托管DLL并封送结果。DLL供应商决定在其非托管对象中的值未定义且被查询时引发异常。我不想对流控制使用异常,所以我将其包装成一个
可空的
,如下所示:

Nullable<int> NativeThirdPartyThingProxy::SomePropThatMayBeUndefined::get() {
    try {
        return Nullable<int>(_thirdPartyThingRef->getPropThatThrowsException());
    } catch (ThirdParty::UndefinedValueException) {
        return Nullable<int>();
    }
}
执行缓慢


是否可以禁用这些
SEHExceptions
并加快显示速度?

除了电话之外,您没有那么多选项。右键单击输出窗口并取消选中“异常消息”。嗯,有一个选择。是的,我已经担心了。我将不得不做-至少在发布模式,它是足够快的,没有这样的消息。
Exception thrown: 'System.Runtime.InteropServices.SEHException' in NativeThirdPartyThingProxy.dll
Exception thrown: 'System.Runtime.InteropServices.SEHException' in NativeThirdPartyThingProxy.dll
Exception thrown: 'System.Runtime.InteropServices.SEHException' in NativeThirdPartyThingProxy.dll
Exception thrown: 'System.Runtime.InteropServices.SEHException' in NativeThirdPartyThingProxy.dll
... many many more