box.error.set() | Tarantool
Tarantool
Check out the new release policy

box.error.set()

box.error.set(error object)

Since version 2.4.1. Set an error as the last system error explicitly. Accepts an error object and makes it available via box.error.last().

Example:

tarantool> err = box.error.new({code = 111, reason = 'cause'})
---
...
tarantool> box.error.last()
---
- error: '[string "return tarantool> box.error.last()"]:1: attempt to compare two
    nil values'
...
tarantool> box.error.set(err)
---
...
tarantool> box.error.last()
---
- cause
...
Found what you were looking for?
Feedback