在 Windows Workflow 3.5 中进行异常处理时如何获取堆栈跟踪?
我试图弄清楚在 Windows Workflow 3.5 中调用故障处理程序时如何访问堆栈跟踪。错误处理程序连接到以下函数:
private void onGeneralFault(object sender, EventArgs e)
但我无法找到如何获取导致此问题的异常。错误处理程序容器有一个错误对象,但当我单步执行调试器中的代码时,该对象似乎设置为 null。另外,Visual Studio 的工作流设计器中有一个单独的“Fault”属性,用于单独的故障处理程序,但它是灰色的,因此我无法设置它。
I am trying to figure out how to access a stack trace when a Fault Handler is invoked in Windows Workflow 3.5. The fault handler is hooked up to the following function:
private void onGeneralFault(object sender, EventArgs e)
but I am having trouble finding how to get to the exception that leads to this. The fault handlers container has a Fault object but that seems to be set to null when I step through the code in the debugger. Also, there is an individual "Fault" property in the workflow designer in Visual Studio for the individual fault handler, but this is greyed out, so I cannot set it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想通了。这些演员表并不是最漂亮的事情,但这就是我最终所做的:
欢迎任何更好的解决方案。
I figured it out. These casts are not the prettiest thing, but this is what I ended up doing:
Any better solutions are welcome.