File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
doc/reference/reference_lua Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,9 @@ Below is a list of ``box.error`` functions and related objects.
275275
276276 * - :doc: `./box_error/set `
277277 - Set the specified error as the last system error explicitly
278+
279+ * - :doc: `./box_error/is `
280+ - Verify whether the specified argument is an error
278281
279282 * - :doc: `./box_error/error_object `
280283 - An object that defines an error
@@ -288,4 +291,5 @@ Below is a list of ``box.error`` functions and related objects.
288291 box_error/clear
289292 box_error/new
290293 box_error/set
294+ box_error/is
291295 box_error/error_object
Original file line number Diff line number Diff line change 1+ .. _box_error-is :
2+
3+ ===============================================================================
4+ box.error.is()
5+ ===============================================================================
6+
7+ .. function :: box.error.is(object_name)
8+
9+ **Since: ** :doc: `3.2.0 </release/3.2.0 >`
10+
11+ The ``box.error.is `` function allows verify whether the specified argument is an error.
12+
13+ :param object_name object_name: the subject of the request
14+
15+ **Return type: **
16+ boolean
17+
18+ **Example **
19+
20+ .. code-block :: lua
21+ tarantool> box.error.is(box.error.new(box.error.UNKNOWN))
22+ ---
23+ - true
24+ ...
25+ tarantool> box.error.is('foo')
26+ ---
27+ - false
28+ ...
You can’t perform that action at this time.
0 commit comments