启动插件时会抛出异常

时间:2016-01-19 02:44:08

标签: c# exception visual-studio-2013 excel-addins

当我从visual studio开始调试Excel添加时,会出现以下错误

A first chance exception of type 'System.NullReferenceException' occurred in PRS.NET.Core.exe

A first chance exception of type 'System.InvalidOperationException' occurred in PRS.NET.Core.exe

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

这些仅仅是输出窗口中的错误,或者您是否在抛出异常?

如果它只在输出窗口中,您可以放心地忽略它。每当抛出异常时,即使调用代码处理了异常,输出窗口中也会出现一条消息。根据项目,这是处理参数验证的常用技术。有些事情 - 让我们尝试一下,如果它失败了(抛出了异常),我们会采用默认的方式来处理这种情况。

因此,总而言之,只有在未处理的情况下,报告异常才会引起您的关注。