Top.Mail.Ru
Submodule box.error | Tarantool
 
Reference / Built-in modules reference / Module box / Submodule box.error
Reference / Built-in modules reference / Module box / Submodule box.error

Submodule box.error

Submodule box.error

The box.error function is for raising an error. The difference between this function and Lua’s built-in error function is that when the error reaches the client, its error code is preserved. In contrast, a Lua error would always be presented to the client as ER_PROC_LUA.

Below is a list of all box.error functions.

Name Use
box.error() Throw an error
box.error.last() Get a description of the last error
box.error.clear() Clear the record of errors
box.error.new() Create an error but do not throw
box.error.set() Set an error as box.error.last()
error_object Error object methods
Custom error types Create a custom error type