当互斥被锁定或者发生错误时,函数返回。
The function returns when the mutex is locked, or if an error occurred.
当错误发生时,或者在您希望向用户返回一个故障时,设置 WS_FAULT对象,并使用一个 Exit函数或 Exit 子语句退出方法。
When an error occurs or when you want to return a fault to the user, set the WS_FAULT object and exit the method with an Exit function or Exit sub statement.
如果要重新阻止一个已被阻止的 IP,或者取消阻止当前未阻止的 IP,可以使用 "rec_check"函数来放弃带错误消息的脚本。"
The "rec_check" function is used to abort the script with an error message if you attempt to re-block an already-blocked IP, or unblock an IP that isn't currently being blocked.
利用一个调试器,将一个观察点main函数上(或者置于您想要关闭Purify错误报告的程序单元上),然后运行仪表化程序。
Using a debugger, put a breakpoint at the main function (or at the program location where you want to turn off Purify error reporting), and run the instrumented program.
函数尝试使用错误的文件描述符(例如,它不引用打开的文件,或者用于尝试写入以只读方式打开的文件)。
EBADF -- A function tried to use a bad file descriptor (it doesn't refer to an open file, for example, or it was used in an attempt to write to a file that was opened read-only).
当错误发生时,v8会抛出一个异常。比如,当一个脚本或者函数试图去访问一个并不存在的属性,或者调用一个并不是函数的函数。
V8 will throw an exception if an error occurs - for example, when a script or function attempts to read a property that does not exist, or if a function is called that is not a function.
如果没有提供回调函数,那么send函数阻塞,一直等到服务器响应到达,或者引发HTTP错误。
If there was no callback function provided, the send function blocks and waits until the server response arrives, or else it raises HTTP errors.
read函数返回读取的字节数(最高为您指定的最大值);或者 -1,表示错误;或者0,如果已经到达文件末尾。
The read function returns the number of bytes read (up to the maximum that you specify), -1 on error, or zero if the end of the file has been reached.
优雅的退出当你在函数中检测到一个错误或者无效状态时,最好的处理方式是什么呢? 返回一个错误代号(error code),抛出一个异常还是调用assert()?
When you detect an error or invalid state in a function, what's the best way to handle it?
第一个基准条件用来处理非整数;第二个用来处理负整数。在小数或者负数做参数的时候,函数就会输出错误信息,返回空到调用出来表明出错了。
The first base case handles nonintegers; the second handles negative integers. In both cases, the program prints an error message and returns None to indicate that something went wrong.
例如,如果在不是对象的内容上进行函数调用或者该内容不支持该调用时,发生此错误。
An example of when this error occurs is a function call made on something that is not an object or does not support the call.
它会去做(在某个地方),一旦完成,它就会调用我们的回调函数,并通过参数把工作结果或者错误信息传给我们。
It does that work (somewhere) and eventually it calls our function with the results of the work or an error.
它会去做(在某个地方),一旦完成,它就会调用我们的回调函数,并通过参数把工作结果或者错误信息传给我们。
It does that work (somewhere) and eventually it calls our function with the results of the work or an error.
应用推荐