Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/reference/reference_lua/box_error.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ Below is a list of ``box.error`` functions and related objects.

* - :doc:`./box_error/set`
- Set the specified error as the last system error explicitly

* - :doc:`./box_error/is`
- Verify whether the specified argument is an error

* - :doc:`./box_error/error_object`
- An object that defines an error
Expand All @@ -288,4 +291,5 @@ Below is a list of ``box.error`` functions and related objects.
box_error/clear
box_error/new
box_error/set
box_error/is
box_error/error_object
28 changes: 28 additions & 0 deletions doc/reference/reference_lua/box_error/is.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. _box_error-is:

===============================================================================
box.error.is()
===============================================================================

.. function:: box.error.is(object_name)

**Since:** :doc:`3.2.0 </release/3.2.0>`

The ``box.error.is`` function allows verify whether the specified argument is an error.

:param object_name object_name: the subject of the request

**Return type:**
boolean

**Example**

.. code-block:: lua
tarantool> box.error.is(box.error.new(box.error.UNKNOWN))
---
- true
...
tarantool> box.error.is('foo')
---
- false
...