Skip to content

pp: implement verbose serialization of box errors#463

Merged
locker merged 1 commit into
tarantool:masterfrom
locker:box-error-verbose-serialization
May 5, 2026
Merged

pp: implement verbose serialization of box errors#463
locker merged 1 commit into
tarantool:masterfrom
locker:box-error-verbose-serialization

Conversation

@locker
Copy link
Copy Markdown
Member

@locker locker commented May 5, 2026

When a test fails with an error, the error is serialized with the tostring Lua function, which by default prints only the error message. This means that some useful information, such as the error trace and payload fields, are lost. We could enable verbose error serialization using the box_error_serialize_verbose compat module option, but it may break existing tests. Let's instead unpack errors thrown by tests before printing them to make debugging easier.

Closes #445

@locker locker force-pushed the box-error-verbose-serialization branch 2 times, most recently from 30ff2c2 to 5b957f1 Compare May 5, 2026 12:07
@locker locker requested a review from nshy May 5, 2026 12:16
Comment thread luatest/pp.lua Outdated
@nshy nshy assigned locker and unassigned nshy May 5, 2026
When a test fails with an error, the error is serialized with the
`tostring` Lua function, which by default prints only the error message.
This means that some useful information, such as the error trace and
payload fields, are lost. We could enable verbose error serialization
using the `box_error_serialize_verbose` compat module option, but
it may break existing tests. Let's instead unpack errors thrown by tests
before printing them to make debugging easier.

Closes tarantool#445
@locker locker force-pushed the box-error-verbose-serialization branch from 5b957f1 to caef7c4 Compare May 5, 2026 13:59
@locker locker merged commit 9fa3932 into tarantool:master May 5, 2026
8 checks passed
@locker locker deleted the box-error-verbose-serialization branch May 5, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable verbose error serialization

2 participants