forked from nodejscn/node-api-cn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
420 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,23 @@ | ||
|
||
正常情况下,如果没有异步操作正在等待,那么Node.js会以状态码`0`退出,其他情况下,会 | ||
用如下的状态码: | ||
正常情况下,如果没有异步操作正在等待,那么 Node.js 会以状态码 `0` 退出,其他情况下,会用如下的状态码: | ||
|
||
* `1` **未捕获异常** - 有一个未被捕获的异常, | ||
并且没被一个 domain 或 an [`'uncaughtException'`][] 事件处理器处理。 | ||
* `2` - 未被使用 (Bash为防内部滥用而保留) | ||
* `3` **内部JavaScript 分析错误** - Node.js的内部的JavaScript源代码 | ||
在引导进程中导致了一个语法分析错误。 | ||
这是非常少见的, 一般只会在开发Node.js本身的时候出现。 | ||
* `4` **内部JavaScript执行失败** - | ||
引导进程执行Node.js的内部的JavaScript源代码时,返回函数值失败。 | ||
这是非常少见的, 一般只会在开发Node.js本身的时候出现。 | ||
* `5` **致命错误** - 在V8中有一个致命的错误. | ||
比较典型的是以`FATALERROR`为前缀从stderr打印出来的消息。 | ||
* `6` **非函数的内部异常处理** - 发生了一个内部异常,但是内部异常处理函数 | ||
被设置成了一个非函数,或者不能被调用。 | ||
* `7` **内部异常处理运行时失败** - 有一个不能被捕获的异常。 | ||
在试图处理这个异常时,处理函数本身抛出了一个错误。 | ||
这是可能发生的, 比如, 如果一个 [`'uncaughtException'`][] 或者 | ||
`domain.on('error')` 处理函数抛出了一个错误。 | ||
* `8` - 未被使用. 在之前版本的Node.js, 退出码8有时候表示一个未被捕获的异常。 | ||
并且没被 domain 或 [`'uncaughtException'`][] 事件处理器处理。 | ||
* `2` - 未被使用 (Bash 为防内部滥用而保留) | ||
* `3` **内部的 JavaScript 解析错误** - Node.js 内部的 JavaScript 源代码在引导进程中导致了一个语法解析错误。 | ||
这是非常少见的, 一般只会在开发 Node.js 本身的时候出现。 | ||
* `4` **内部的 JavaScript 执行失败** - 引导进程执行 Node.js 内部的 JavaScript 源代码时,返回函数值失败。 | ||
这是非常少见的, 一般只会在开发 Node.js 本身的时候出现。 | ||
* `5` **致命错误** - 在 V8 中有一个致命的错误。 | ||
比较典型的是以 `FATALERROR` 为前缀从 stderr 打印出来的消息。 | ||
* `6` **非函数的内部异常处理** - 发生了一个内部异常,但是内部异常处理函数被设置成了一个非函数,或者不能被调用。 | ||
* `7` **内部异常处理运行时失败** - 有一个不能被捕获的异常,在试图处理这个异常时,处理函数本身抛出了一个错误。 | ||
这是可能发生的, 比如, 如果一个 [`'uncaughtException'`][] 或者 `domain.on('error')` 处理函数抛出了一个错误。 | ||
* `8` - 未被使用,在之前版本的 Node.js, 退出码 8 有时候表示一个未被捕获的异常。 | ||
* `9` - **不可用参数** - 也许是某个未知选项没有确定,或者没给必需要的选项填值。 | ||
* `10` **内部JavaScript运行时失败** - 调用引导函数时, | ||
引导进程执行Node.js的内部的JavaScript源代码抛出错误。 | ||
这是非常少见的, 一般只会在开发Node.js本身的时候出现。 | ||
* `10` **内部的 JavaScript 运行时失败** - 调用引导函数时,引导进程执行 Node.js 内部的 JavaScript 源代码抛出错误。 | ||
这是非常少见的, 一般只会在开发 Node.js 本身的时候出现。 | ||
* `12` **不可用的调试参数** - `--inspect` 和/或 `--inspect-brk` 选项已设置,但选择的端口号无效或不可用。 | ||
* `>128` **退出信号** - 如果Node.js的接收信号致命诸如 `SIGKILL` 或 `SIGHUP`,那么它的退出代码将是 `128` 加上信号的码值。 这是POSIX的标准做法,因为退出码被定义为7位整数,并且信号退出设置高位,然后包含信号码值。 | ||
* `>128` **退出信号** - 如果 Node.js 的接收信号致命诸如 `SIGKILL` 或 `SIGHUP`,那么它的退出代码将是 `128` 加上信号的码值。 | ||
这是 POSIX 的标准做法,因为退出码被定义为 7 位整数,并且信号退出设置高位,然后包含信号码值。 | ||
例如,信号 `SIGABRT` 的值为 `6`,因此预期的退出代码将为 `128` + `6` 或 `134`。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.