将异常设置配置为在引发异常时不中断(VS2015) [英] Configuring Exception Settings to not break when I throw Exceptions (VS2015)

查看:737
本文介绍了将异常设置配置为在引发异常时不中断(VS2015)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我只是将一些源代码从一台计算机转移到另一台计算机.在旧计算机上,我将在VS2015中进行开发,并且将异常设置设置为在代码显式引发异常时不中断.通过明确"我的意思是 代码中的一行故意引发如下异常:

引发新的Exception(我的异常消息");

我在一个MVC应用程序中工作,该应用程序配置为通过将异常消息发送回浏览器来处理异常,该异常消息在由javascript处理的特殊的用户友好消息框中显示在屏幕上.不知何故我的旧VS2015环境 当异常是这种情况并且没有中断时,我就知道了.现在,我正在一个新环境(新计算机,全新VS2015安装)中工作,并且在抛出异常的地方以及在重新抛出异常的调用堆栈中的所有地方,它都处于中断状态.

我对此进行了研究,并告诉我命中率设置为未处理用户代码时继续".在例外设置"窗口中的针对公共语言运行时例外的其他操作"下.但这不起作用.

有人知道我还能做什么吗?

Hello,

I just transferred some source code from one computer to another. On the old computer, I would develop in VS2015 and the exception settings would be setup to not break when the code explicitly throws an exception. By "explicitely" I mean there is a line in the code which deliberately throws an exception like this:

throw new Exception("my exception message");

I'm working in an MVC application which is configured to handle exceptions by sending the exception message back to the browser where it is displayed on the screen in a special user-friendly message box handled by javascript. Somehow my old VS2015 environment recognized when the exception was of this sort and didn't break. Now I'm working in a new environment (new computer, fresh VS2015 install) and it's breaking where the exception is thrown and at all points in the call stack where it is re-thrown.

I researched this and the hits I got told me to set "Continue when unhandled in user code" under Additional Actions for Common Language Runtime Exceptions in the Exception Settings window. But this is not working.

Does anyone know what else I can do?

推荐答案

欢迎来到MSDN论坛.

根据您的描述,您的问题与Visual Studio的一般问题更相关,我将您的话题移至 https://social.msdn.microsoft.com /Forums/vstudio/zh-CN/home?forum = visualstudiogeneral 以获得专业支持.谢谢您的理解.

According to your description, your issue is more related to visual studio general questions, I will move your thread to https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=visualstudiogeneral for a professional support. Thank you for understanding.

最诚挚的问候,

Joyce


这篇关于将异常设置配置为在引发异常时不中断(VS2015)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆