Top.Mail.Ru
box.error.last() | Tarantool
 

box.error.last()

box.error.last()

box.error.last()

Show the last error object.

Example:

You can reach the last error object’s fields like this:

tarantool> box.schema.space.create('')
---
- error: Invalid identifier '' (expected printable symbols only or it is too long)
...
tarantool> box.error.last()
---
- Invalid identifier '' (expected printable symbols only or it is too long)
...
tarantool> box.error.last().code
---
- 70
...
tarantool> box.error.last().type
---
- ClientError
...
Return:the last error object
Rtype:cdata