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
2 changes: 1 addition & 1 deletion doc/reference/reference_lua/box_error.rst
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Below is a list of ``box.error`` functions and related objects.
- Set the specified error as the last system error explicitly

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

* - :doc:`./box_error/error_object`
- An object that defines an error
Expand Down
2 changes: 1 addition & 1 deletion doc/reference/reference_lua/box_error/error_object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,6 @@ error_object

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

Returns the name of the error used at creation.
Returns the name of the error.


25 changes: 13 additions & 12 deletions doc/reference/reference_lua/box_error/is.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@
box.error.is()
===============================================================================

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

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

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

:param object_name object_name: the subject of the request
:param object object: the name of the othe object to be verified.

**Return type:**
boolean

**Example**

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

tarantool> box.error.is(box.error.new(box.error.UNKNOWN))
---
- true
...
tarantool> box.error.is('foo')
---
- false
...