Tarantool CE/EE Documentation portal logo
Support
Updated at July 17, 2026   02:08 PM

Module error

For a complete list of errors, refer to the Tarantool error code header file.

Error – contains information about error.

Return the error type, e.g. "ClientError", "SocketError", etc.

Parameters:

  • error (box_error_t*) — error

Returns

not-null string

Return IPROTO error code

  • error (box_error_t*) — error

Returns

box_error_code

Return the error message

  • error (box_error_t*) — error

Returns

not-null string

Get the information about the last API call error.

The Tarantool error handling works most like libc's errno. All API calls return -1 or NULL in the event of error. An internal pointer to box_error_t type is set by API functions to indicate what went wrong. This value is only significant if API call failed (returned -1 or NULL).

Successful function can also touch the last error in some cases. You don't have to clear the last error before calling API functions. The returned object is valid only until next call to any API function.

You must set the last error using box_error_set() in your stored C procedures if you want to return a custom error message. You can re-throw the last API error to IPROTO client by keeping the current value and returning -1 to Tarantool from your stored procedure.

Returns

last error

Clear the last error.

Set the last error.

  • file (const char*) — none

  • line (unsigned) — none

  • code (uint32_t) — IPROTO error code

  • format (const char*) — none

  • ... — format arguments

See also: IPROTO error code

A backward-compatible API define.