The function returns an error or success code; if it's an error code, the code itself can be used to figure out what went wrong.
函数返回错误代码或成功代码;如果是错误代码,则代码本身可用于指出何处出错。
you could create a function such as the following, which also handles the return code and, if needed, increases the error counter
而是创建一个如下所示的函数,此函数也可以处理返回码,如果有必要,还可以增加错误计数器
The luaL_loadbuffer() function compiles a script into Lua code; if there is a syntax error, this is where the failure is observed.
luaL_loadbuffer()函数将一个脚本编译成Lua代码。如果有语法错误,从这里可以观察到失败。
Using the sys_nerr global variable and the strerror() function, you can easily whip up some code (see Listing 5) to print out all of the built-in error messages of the system.
通过使用 sys_nerr全局变量和strerror()函数,将可以很轻松地快速编写一些代码(请参见清单5)以打印出系统的所有内置错误消息。
Then we call the exit() function with an error code; for this utility, we've chosen to return different numbers for every different error condition.
随后我们用错误码调用exit()函数;对于本实用程序,我们已经选择了对每个不同错误条件返回不同数字。
For example, Listing 3 creates a function in the ZipMap class that looks up the name of a city given its ZIP code (error and exception-handling code are ommitted for brevity).
例如,清单3在ZipMap类中创建了一个函数,通过给定的ZIP代码查找城市名称(为了简便起见,省略了错误和异常处理)。
The mysqli_errno function returns the error code of the most recent function call.
mysqli_errno函数返回最近的函数调用的错误码。
Returns an error or status code associated with the most recent function call.
返回最近调用此函数产生的状态信息或错误代码。
The most recent status or error code generated as the result of calling a function defined by the System Configuration framework.
调用在系统配置框架中定义的此函数所产生的最新的状态信息或错误代码。
It is a very common error to read code with include, or require, functions, or another file access function, and have Spaces or empty lines that are output before header is called.
这是一个非常常见的错误与包括阅读代码,或者要求,功能,或另一个文件访问功能,前有空格或空行输出标题。
The testing of functions includes that the function is correct by the function testing and each function can return its error code correctly when it is called incorrectly.
函数测试包括函数功能正确性测试和错误调用时返回状态正确性测试。
The address of the CLR function that caused the fatal error, the ID of the thread where the error occurred, and the error code.
导致致命错误的clr函数的地址、发生错误的线程的ID和错误代码。
The address of the CLR function that caused the fatal error, the ID of the thread where the error occurred, and the error code.
导致致命错误的clr函数的地址、发生错误的线程的ID和错误代码。
应用推荐