更新时间:2022-06-08 21:27:38
如果组件异常在堆栈中向上传播到托管代码,.NET框架尝试将其映射到托管异常.例如,STATUS_NO_MEMORY映射到OutOfMemoryException,而STATUS_ACCESS_VIOLATION映射到NullReferenceException.
为了更清楚起见,您可以在
中捕获异常详细信息
If the component exception is propagated up the stack to managed code, .NET framework tries to map it to a managed exception. For example, STATUS_NO_MEMORY maps to OutOfMemoryException and STATUS_ACCESS_VIOLATION maps to NullReferenceException.
For better clarity, you catch the exception details in
try {...}
catch (Exception ex) {...}
然后,共享异常的详细信息,代码和组件的详细信息.这将有助于我们提供解决方案.
Then, share the details of the exception, code and component details. That will help us to provide the solution.