vb.net中的溢出错误 [英] overflow error in vb.net

查看:110
本文介绍了vb.net中的溢出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请提供解决方案,以解决vb.net项目中发生溢出"错误..

please give solution for the error "Overflow" occur in in vb.net project..

推荐答案

我们不能.

当您的程序尝试使用对于尝试处理它的数据类型而言太大的值时,就会发生溢出"错误.例如,一个无符号字节的数量为8位:它可以对0到255之间的值进行取整.因此,如果将200装入其中,然后尝试将其加200,它将溢出.
如果没有您的代码,并且对错误发生的位置有所了解,我们将无法解决您的问题.

但是您可以:发生时,它将引发异常,该异常将提供大量信息,例如什么函数,什么行号等等.捕获异常,然后对其进行查看.如有必要,将其记录到文件中,然后在无法通过调试器运行服务器代码的情况下稍后查看.

它应该告诉您问题出在哪里,或者给您足够的信息以告诉我们问题出在哪里.
We can''t.

The Overflow error occurs when you program tries to use a value that is too large for the datatype that is trying to handle it. For example, a unsigned byte is an eight bit quantity: it can hole values from 0 to 255. So if you load it with 200 and then try to add 200 to it, it will overflow.

Without your code, and some idea of where the error occurs, we cannot solve your problem.

But you can: When it occurs the it will raise an exception, which will give loads of information, such as what function, what line number, and so forth. Catch the exception, and look at it. If necessary, log it to a file and view it later if you cannot run the server code through a debugger.

It should either tell you where the problem is, or give you enough information to be able to tell us where it occurs.


这篇关于vb.net中的溢出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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