[Tarantool-patches] [PATCH v2 10/11] box: enrich ER_READONLY with new details

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Nov 16 00:56:19 MSK 2021


> Thanks for the changes!
> 
> One final note:
> I propose to move box_ro_reason() from the last commit here and use it
> when setting error reason, so that error.reason would be the same as
> box.info.ro_reason.

I added more details to error message than to ro_reason because when you
see ro_reason, you can go and check other fields of box.info for details.
When you have only an error object, and what is worse - it is cast to a
string during packing, you don't have a place to look up the details
already. Thus I wanted the error object to be self-sufficient. Even if
it degrades to a simple string during marshaling.


More information about the Tarantool-patches mailing list