Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net.box: make
handle_eval_result
more robust
Currently, in the error case, `handle_eval_result` constructs a new error passing the error it receives as an argument (which can be a string or a box.error) to the message argument of the `box.error` constructor. Then, during `box.error` construction, if the error argument of `handle_eval_result` was a `box.error`, it is converted to a string using the `__tostring` metamethod, which currently returns the error's message, losing the rest of the error's information. But in scope of tarantool#9105, we are going to increase the verbosity of the `__tostring` metamethod, and it will not return the error's message. To adjust to this new behaviour, let's make `handle_eval_result` more robust, and either create a simple `ER_PROC_LUA` error if the error is a string, or change the error object's code to `ER_PROC_LUA` (for backwards-compatibility) in case the error is a `box.error`. Needed for tarantool#9105 NO_CHANGELOG=<internal change> NO_TEST=<internal change> NO_DOC=<internal change>
- Loading branch information