错误处理


¥Error handling

Node-API 使用返回值和 JavaScript 异常来处理错误。以下部分解释了每种情况的方法。

¥Node-API uses both return values and JavaScript exceptions for error handling. The following sections explain the approach for each case.