每个SHE异常都通过一个无符号整数的异常码(Exception Code)来惟一标识,这个异常码是在系统引发异常时指定的。在操作系统引发的异常中使用了操作系统开发人员定义的公开异常码(例如访问违...
基于58个网页-相关网页
软件应用中出现的问题常有如下几种重要来源: (1)软件异常代码(exception code) 主要的行代码通常都能正常工作,薄弱环节一般都出现在软件异常代码不能 7 正常处理异常的输入或环境条件,或者当接口没有按预期或...
基于12个网页-相关网页
operator exception code [计] 运算异常码 ; 运算子异常码
program exception code 程序异常代码 ; 程序异常码
Replace Error Code with Exception 用异常代替错误码 ; 以异常取代错误码 ; 用非常替代过失码 ; 用异常庖代错误码
MRP planning exception code MRP规划异常码
exception-safe code 异常安全代码
Repalce Error Code with Exception 以异常取代错误码
With the exception that one of the listeners converts the input string to uppercase, the code for the listeners is exactly the same.
除了一个监听器将输入字符串转换成大写字母之外,监听器的代码完全相同。
If your data access code catches an exception, do not ignore it.
如果数据访问代码捕获了一个异常,不要忽略它。
To avoid distractions I've ignored exception handling in the code.
为避免分散注意力,我已在代码中忽略了异常处理。
OK, so far though, I've just shown you what happens inside a peace a code. It raises an exception. It goes to that accept clause. We don't have to use it just inside of one place.
好了,我已经给你们看了,代码内部发生了什么,它报了一个异常,然后就到了处理的片段,我们不该就在一个地方用它。
What does that say? It says if in the code up here I get an exception of that sort, I'm going to go to this place to handle it.
这意味着如果在代码中,我得到一个这样的异常,我能到这里来处理它。
So, summarizing better, assert is something you put in to say to the user, make sure you're giving me input of this type, but I'm going to guarantee you the rest of the code works correctly. Exceptions and exception handlers are saying, here are the odd cases that I might see and here's what I'd like to do in those cases in order to try and be able to deal with them.
所以更好的总结下,断言就是你放在那里告诉用户,保证你输入的是这种类型的,但我能保证剩下的代码运行正确,异常和异常处理做的事,这里有些我能预期的异常情况,并且这里有些情况,我能尝试处理。
应用推荐