Skip to content
Snippets Groups Projects
Commit 96476a0f authored by Aleksandr Lyapunov's avatar Aleksandr Lyapunov Committed by Aleksandr Lyapunov
Browse files

lua: use internal error description for ClientError

box.error creates a ClientError unless custom type is provided.
There are two forms of ClientError creation:
* box.error(code, ...)
* box.error({code = code, ...})
The first form generates an error with reason that is constructed
from internal error description, and this is good.
The second one can use reason or message explicily provided in
argument table, but if none is provided generates an empty message.
That differs for the first behavior and hampers generation of
ClientError creation from lua.

This patch fixes that and uses internal error description for
ClientError if the message was not provided explicitly.

Closes #9876

NO_CHANGELOG=was not released yet
NO_DOC=bugfix
parent 1826ca7c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment