box.error.set() | Tarantool
Документация на русском языке
поддерживается сообществом

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
...
Нашли ответ на свой вопрос?
Обратная связь