box/lua: allow to set error cause via `prev` argument
Currently, it's only possible to set an error cause with the set_prev method. This isn't very convenient, because one has to construct a new error without raising it, then set its cause, and only then raise it. To simplify this, a new argument `prev` is added to the error constructor. Closes #9103 @TarantoolBot document Title: Document `prev` argument to table constructor of `box.error.new` Product: Tarantool Since: 3.1 Root documents: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_error/new/ and https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_error/error/ [Link to the design document](https://www.notion.so/tarantool/Error-subsystem-improvements-90faa0a4714b4143abaf8bed2c10b2fc?pvs=4#c72c870f24734020aae1fbf34e2b8569)
Showing
- changelogs/unreleased/gh-9103-error-new-prev-arg.md 3 additions, 0 deletionschangelogs/unreleased/gh-9103-error-new-prev-arg.md
- src/box/lua/error.cc 17 additions, 0 deletionssrc/box/lua/error.cc
- test/box-luatest/error_subsystem_improvements_test.lua 16 additions, 1 deletiontest/box-luatest/error_subsystem_improvements_test.lua
Loading
Please register or sign in to comment