[tarantool-patches] Re: [PATCH v2 1/3] box: rfc for stacked diagnostic area in Tarantool

Alexander Turenko alexander.turenko at tarantool.org
Fri Aug 30 15:58:51 MSK 2019


> +### Lua API
> +Tarantool returns a last-set (diag::last) error object as `cdata` from central diagnostic
> +area to Lua in case of error. User shouldn't have an ability to modify it
> +(because he actually needn't and because it is dangerous - he doesn't own this object),
> +but it need an ability to inspect a collected diagnostics information.
> +
> +Let's extend the `box.error` API with a couple of new functions:
> +1) `prev` that allows to get a reason of given error:
> +
> +```
> +-- Return a reason error object for given error
> +-- (when exists, nil otherwise)
> +box.error.prev(error)
> +```

I would also add err:prev() method like we did for, say,
box.tuple.update(t, <...>) and t:update(<...>).




More information about the Tarantool-patches mailing list