Top.Mail.Ru
box.error.set() | Tarantool
Tarantool
Узнайте содержание релиза 2.8

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().

Пример:

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
...