diff --git a/src/box/mp_error.cc b/src/box/mp_error.cc index 61cf5e1b8debe79f7465c8a7c0eb096119c3a5b5..36fbcefc50b706209d2ef6196ed21ab01e31ff3b 100644 --- a/src/box/mp_error.cc +++ b/src/box/mp_error.cc @@ -97,6 +97,16 @@ enum { MP_ERROR_MAX, }; +static const char *const mp_error_field_to_json_key[MP_ERROR_MAX] = { + "\"type\": ", + "\"file\": ", + "\"line\": ", + "\"message\": ", + "\"errno\": ", + "\"code\": ", + "\"fields\": ", +}; + /** * The structure is used for storing parameters * during decoding MP_ERROR. @@ -561,16 +571,6 @@ error_unpack_unsafe(const char **data) return err; } -static const char *const mp_error_field_to_json_key[MP_ERROR_MAX] = { - [MP_ERROR_TYPE] = "\"type\": ", - [MP_ERROR_FILE] = "\"file\": ", - [MP_ERROR_LINE] = "\"line\": ", - [MP_ERROR_MESSAGE] = "\"message\": ", - [MP_ERROR_ERRNO] = "\"errno\": ", - [MP_ERROR_CODE] = "\"code\": ", - [MP_ERROR_FIELDS] = "\"fields\": ", -}; - /** * Include this file into self with a few template parameters * to create mp_snprint_error() and mp_fprint_error() functions