Commit 885a3d7
box/lua: allow to set error cause via
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 tarantool#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)prev argument1 parent 4043664 commit 885a3d7
File tree
3 files changed
+36
-1
lines changed- changelogs/unreleased
- src/box/lua
- test/box-luatest
3 files changed
+36
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
178 | 188 | | |
179 | 189 | | |
180 | 190 | | |
| |||
192 | 202 | | |
193 | 203 | | |
194 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
195 | 212 | | |
196 | 213 | | |
197 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
4 | 20 | | |
5 | 21 | | |
6 | 22 | | |
| |||
67 | 83 | | |
68 | 84 | | |
69 | 85 | | |
70 | | - | |
71 | 86 | | |
72 | 87 | | |
73 | 88 | | |
| |||
0 commit comments