New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor box.execute to not throw #4390
Comments
ImeevMA
added a commit
that referenced
this issue
Jul 30, 2019
In accordance with the Lua coding style in Tarantool, all errors returned in Lua should be returned using 'return nil, error'. However, box.execute() throws an exception in case of an error. This patch causes box.execute() to return an error, as described in the coding style. Closes #4390
ImeevMA
added a commit
that referenced
this issue
Jul 31, 2019
In accordance with the Lua coding style in Tarantool, all errors returned in Lua should be returned using 'return nil, error'. However, box.execute() throws an exception in case of an error. This patch causes box.execute() to return an error, as described in the coding style. Closes #4390
ImeevMA
added a commit
that referenced
this issue
Jul 31, 2019
Currently, if we have to return errors using the format 'return nil, error', we must do it manually. Since this error return method is described in our Lua coding style, it makes sense to create a function that will return an error in this format. This patch creates a function. Needed for #4390
ImeevMA
added a commit
that referenced
this issue
Jul 31, 2019
In accordance with the Lua coding style in Tarantool, all errors returned in Lua should be returned using 'return nil, error'. However, box.execute() throws an exception in case of an error. This patch causes box.execute() to return an error, as described in the coding style. Closes #4390
ImeevMA
added a commit
that referenced
this issue
Jul 31, 2019
Currently, if we have to return errors using the format 'return nil, error', we must do it manually. Since this error return method is described in our Lua coding style, it makes sense to create a function that will return an error in this format. This patch creates a function. Needed for #4390
ImeevMA
added a commit
that referenced
this issue
Jul 31, 2019
In accordance with the Lua coding style in Tarantool, all errors returned in Lua should be returned using 'return nil, error'. However, box.execute() throws an exception in case of an error. This patch causes box.execute() to return an error, as described in the coding style. Closes #4390
ImeevMA
added a commit
that referenced
this issue
Jul 31, 2019
Currently, if we have to return errors using the format 'return nil, error', we must do it manually. Since this error return method is described in our Lua coding style, it makes sense to create a function that will return an error in this format. This patch creates a function. Needed for #4390
ImeevMA
added a commit
that referenced
this issue
Jul 31, 2019
In accordance with the Lua coding style in Tarantool, all errors returned in Lua should be returned using 'return nil, error'. However, box.execute() throws an exception in case of an error. This patch causes box.execute() to return an error, as described in the coding style. Closes #4390
ImeevMA
added a commit
that referenced
this issue
Jul 31, 2019
Currently, if we have to return errors using the format 'return nil, error', we must do it manually. Since this error return method is described in our Lua coding style, it makes sense to create a function that will return an error in this format. This patch creates a function. Needed for #4390
ImeevMA
added a commit
that referenced
this issue
Jul 31, 2019
In accordance with the Lua coding style in Tarantool, all errors returned in Lua should be returned using 'return nil, error'. However, box.execute() throws an exception in case of an error. This patch causes box.execute() to return an error, as described in the coding style. Closes #4390
ImeevMA
added a commit
that referenced
this issue
Jul 31, 2019
Currently, if we have to return errors using the format 'return nil, error', we must do it manually. Since this error return method is described in our Lua coding style, it makes sense to create a function that will return an error in this format. This patch creates mentioned function. Needed for #4390
ImeevMA
added a commit
that referenced
this issue
Jul 31, 2019
In accordance with the Lua coding style in Tarantool, all errors returned in Lua should be returned using 'return nil, error'. However, box.execute() throws an exception in case of an error. This patch causes box.execute() to return an error, as described in the coding style. Closes #4390
Gerold103
pushed a commit
that referenced
this issue
Aug 1, 2019
Currently, if we have to return errors using the format 'return nil, error', we must do it manually. Since this error return method is described in our Lua coding style, it makes sense to create a function that will return an error in this format. This patch creates mentioned function. Needed for #4390
Gerold103
pushed a commit
that referenced
this issue
Aug 1, 2019
In accordance with the Lua coding style in Tarantool, all errors returned in Lua should be returned using 'return nil, error'. However, box.execute() throws an exception in case of an error. This patch causes box.execute() to return an error, as described in the coding style. Closes #4390
kyukhin
pushed a commit
that referenced
this issue
Aug 2, 2019
Currently, if we have to return errors using the format 'return nil, error', we must do it manually. Since this error return method is described in our Lua coding style, it makes sense to create a function that will return an error in this format. This patch creates mentioned function. Needed for #4390
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently box.execute uses exceptions mechanism to report an error.
According to Lua coding style it should use Go-style
res, err = ...
.The text was updated successfully, but these errors were encountered: