summaryrefslogtreecommitdiff
path: root/node_modules/node-addon-api/doc/range_error.md
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-03 02:37:42 -0700
committer8cy <[email protected]>2020-04-03 02:37:42 -0700
commit60867fb030bae582082340ead7dbc7efdc2f5398 (patch)
tree4c6a7356351be2e4914e15c4703172597c45656e /node_modules/node-addon-api/doc/range_error.md
parentcommenting (diff)
downloads5nical-60867fb030bae582082340ead7dbc7efdc2f5398.tar.xz
s5nical-60867fb030bae582082340ead7dbc7efdc2f5398.zip
2020/04/03, 02:34, v1.2.0
Diffstat (limited to 'node_modules/node-addon-api/doc/range_error.md')
-rw-r--r--node_modules/node-addon-api/doc/range_error.md59
1 files changed, 59 insertions, 0 deletions
diff --git a/node_modules/node-addon-api/doc/range_error.md b/node_modules/node-addon-api/doc/range_error.md
new file mode 100644
index 0000000..e134a40
--- /dev/null
+++ b/node_modules/node-addon-api/doc/range_error.md
@@ -0,0 +1,59 @@
+# RangeError
+
+The `Napi::RangeError` class is a representation of the JavaScript `RangeError` that is
+thrown when trying to pass a value as an argument to a function that does not allow
+a range that includes the value.
+
+The `Napi::RangeError` class inherits its behaviors from the `Napi::Error` class (for
+more info see: [`Napi::Error`](error.md)).
+
+For more details about error handling refer to the section titled [Error handling](error_handling.md).
+
+## Methods
+
+### New
+
+Creates a new instance of a `Napi::RangeError` object.
+
+```cpp
+Napi::RangeError::New(Napi::Env env, const char* message);
+```
+
+- `[in] Env`: The environment in which to construct the `Napi::RangeError` object.
+- `[in] message`: Null-terminated string to be used as the message for the `Napi::RangeError`.
+
+Returns an instance of a `Napi::RangeError` object.
+
+### New
+
+Creates a new instance of a `Napi::RangeError` object.
+
+```cpp
+Napi::RangeError::New(Napi::Env env, const std::string& message);
+```
+
+- `[in] Env`: The environment in which to construct the `Napi::RangeError` object.
+- `[in] message`: Reference string to be used as the message for the `Napi::RangeError`.
+
+Returns an instance of a `Napi::RangeError` object.
+
+### Constructor
+
+Creates a new empty instance of a `Napi::RangeError`.
+
+```cpp
+Napi::RangeError::RangeError();
+```
+
+### Constructor
+
+Initializes a `Napi::RangeError` instance from an existing Javascript error object.
+
+```cpp
+Napi::RangeError::RangeError(napi_env env, napi_value value);
+```
+
+- `[in] Env`: The environment in which to construct the `Napi::RangeError` object.
+- `[in] value`: The `Napi::Error` reference to wrap.
+
+Returns an instance of a `Napi::RangeError` object.