使用qr码输出需要较少的错误检查。
为了增加更健壮的错误处理并尽量避免过于复杂,可以增加一两个状态码检查,请看一看清单15中修改后的updatePage()版本。
To add more robust error handling -- with minimal complication -- you might add a check or two for other status codes; check out the modified version of updatePage() in Listing 15.
一种用于检查一组字符的错误、并且具有最小冗余度的循环码。
A cyclic code with minimum redundancy used to check errors in a set of characters.
不过,其他类型的错误则会要求您侦错程序码,即在程序码执行期间对其进行检查,以验证执行路径和资料是正确的。
However, other types of errors require that you debug your code - that is, that you examine the code while it is running to validate that the execution path and data is as it should be.
通常人们很容易忘记检查名称或者使用方括弧,而如此将会在您的程序码中产生错误并使它更难以阅读。
It can be easy to forget to qualify names or include square brackets, and thus introduce errors into your code and make it harder to read.
您可以透过检查范围并拒绝程序码无法处理的任何输入,以修正这些错误。
You can fix these bugs through range checking and rejecting any input the code cannot handle.
您可以透过检查范围并拒绝程序码无法处理的任何输入,以修正这些错误。
You can fix these bugs through range checking and rejecting any input the code cannot handle.
应用推荐