尝试捕获中的异常未显示任何内容 [英] Exception in Try Catch shows nothing

查看:110
本文介绍了尝试捕获中的异常未显示任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将vb.net 2005与Framework 2.0配合使用,当我尝试调试应用程序时
Try Catch块导致异常.但是异常消息什么也没有.

我发现我的代码中没有错误.对于例如

I am using vb.net 2005 with framework 2.0 When I try debugging my application
the Try Catch block results in exception. But the exception message is nothing.

I found there is no errors in my code. For eg

Try
    lngGwt = 0
    lngClrStoneval = 0
    lngDiaVal = 0
    lngWastTotal = 0
    lnggoldVal = 0
    lngGwt=0
Catch ex As Exception
    MsgBox(ex.Message)
End Try


这本身导致捕获块.之前它工作正常.正在从昨天开始面对这个问题.


This itself results in catch block. Earlier it was working fine. Am facing this from yesterday.

推荐答案

从昨天开始"……这意味着您在没有版本控制系统的情况下工作.节省您的时间和精力,停止它!修订控制系统可以是苗条的,非侵入性的,可靠的,得到良好支持的并且是免费的,因为它是开源的.请参阅以下讨论:版本控制系统,可以从中选择? [ ^ ].对不起,但不使用修订控制系统没有任何借口.即使您一直努力,也要始终使用它.

现在,看来您不再抛出异常.为什么这么好?请理解:异常不是调试工具,这是最重要的运行时技术之一.而且调试工具很好……调试器.只需使用它;这样一来,您就不会再有什么都没有的奥秘了,就像您要问的那样.

祝你好运,
—SA
"From yesterday"… It means you are working without Revision Control System. Save your time and nerve, stop it! Revision Control System can be slim, non-intrusive, reliable, well-supported, and free of charge because Open Source. See this discussion: Revision control systems, which to choose from?[^]. Excuse me, but not using Revision Control System has no excuses. Always use it, even if you work along.

Now, it looks like you don''t have exception thrown anymore. Why it''s so wonderful? Please understand: exception is not a debugging tool, this is one of the most important run-time techniques. And the debugging tool is well… the Debugger. Just use it; and you will stop having mysteries about nothing, like the one you are asking about.

Good luck,
—SA


您的代码似乎没有任何异常,因此您的代码将不会引发任何异常.
There does not seem to be any exception in your code, as a result your code will throw no exception.


这篇关于尝试捕获中的异常未显示任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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