Inrernal应用程序错误 [英] Inrernal application error
问题描述
你好,
我有以下代码,当我调用"throw new Derived()"时它显示错误消息"内部应用程序错误。"
I have following code , when i cam calling "throw new Derived()" it is showing error message "internal Application error."
========================== ====
==============================
==============
==============
基本上我将我们的应用程序从visual studio 2003升级到2008 。在2003年,我可以打电话给"throw Derived()" (没有新的)工作正常。但在升级到2008之后,我必须更改"throw Derived()" to to"throw
new Derived()"
Basically i was upgrading the our application from visual studio 2003 to 2008 . in 2003 i can call "throw Derived()" (without new) that was working fine. but after upgrading to 2008 i have to change "throw Derived()" to "throw new Derived()"
请建议我不想对应用程序进行重大更改,因为它可能影响所有依赖的类。
Please suggest i would not like to do major changes in the application as it may impact all depended classes.
谢谢,
Sushil Kumar
Sushil Kumar
推荐答案
你正在抛出一个指针,只有一个对象的处理程序 - 而不是指针。这就是你得到这个错误的原因。您抛出的异常对象需要与您捕获的类型匹配才能使处理程序正常工作。
you are throwing a pointer and only have a handler of an object - not the pointer. that is why you are getting this error. The exception object you throw needs match the type you catch in order for the handler to work.
这篇关于Inrernal应用程序错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!