简体   繁体   English

Visual Studio中的其他未处理异常

[英]Alternate unhandled exceptions in visual studio

I am trying to build a stitcher code using opencv n visual studio. 我正在尝试使用opencv n visual studio构建一个拼接器代码。 I asked a question about unhandled exception here but then it worked fine in Opencv2.4.10 It builds fine now and also debugs well once, twice or maximum three times. 在这里问了一个有关未处理异常的问题,但随后它在Opencv2.4.10中运行良好,现在可以正常运行,并且可以调试一次,两次或最多调试三次。 After that it starts throwing unhandled exceptions at memory locations. 之后,它开始在内存位置抛出未处理的异常。 Then, if I clean and build the solution, it again works fine once or twice but then again throws unhandled exceptions. 然后,如果我清理并构建解决方案,则它可以再次正常工作一两次,但随后又抛出未处理的异常。

My question is what is the root cause of these exceptions? 我的问题是这些异常的根本原因是什么? And also is there a way to ensure that there are no such exceptions at all? 还有没有办法确保根本没有这样的例外?

Exceptions can have many causes, but for novice programmers they are usually programming errors of one sort or another. 异常可能有多种原因,但是对于新手程序员而言,它们通常是某种类型的编程错误。

There are more ways to go wrong than there are to go right, so I can't give a general cause of all exceptions. 出错的方法比正确的方法多,所以我无法给出所有异常的一般原因。

To discover the root cause of each exception, run the program in the debugger, with "break on exception thrown" option set. 要发现每个异常的根本原因,请在调试器中运行程序,并设置“引发异常时中断”选项。 Then, whenever an exception is thrown, you can examine the code, and the call stack, to discover why the exception is thrown. 然后,只要引发异常,就可以检查代码和调用堆栈,以发现引发异常的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM