[英]How to prevent Visual Studio from breaking on exception thrown in SignalR hub?
I am developing a SignalR application and when something wrong happens during a SignalR call from client, I would like to propagate the exception back to the client. 我正在开发SignalR应用程序,当从客户端调用SignalR时发生错误时,我想将异常传播回客户端。 However, instead of sending the exception right back to the client, Visual Studio breaks on:
但是,Visual Studio不会将异常直接发送回客户端,而是会中断:
HubException was unhandled by user code
If I hit F5 to continue, the exception correctly propagates back to the client. 如果我按F5键继续,则异常会正确传播回客户端。
Is there a way to teach Visual Studio to just ignore certain classes of exceptions during hub execution? 有没有一种方法可以教Visual Studio在中心执行过程中忽略某些类的异常?
This solution does not work - it catches other exceptions, but VS still breaks on the HubException: How to NOT breaking on an exception? 该解决方案不起作用-它捕获了其他异常,但是VS仍然在HubException上中断: 如何不中断异常?
in a code window pres CTRL + D E to open the Exceptions window -> Add -> enter HubException and uncheck Thrown and User-unhandeled 在代码窗口PRES CTRL + d E打开例外窗口- >添加- >输入HubException和取消抛出 用户unhandeled
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.