error: move code to struct error from ClientError
All optional fields soon will be moved into error_payload. Code was optional too. But it is needed too often, the most used field. The patch moves it into struct error to make it more accessible. Also in future it should allow to drop the hack ClientError::get_errcode() which tries to return error code depending on error type. But could just store the code right away. As a consequence of the patch, errors which didn't have an error code at all before, such as LuajitError, now have it 0 in Lua. Part of #5568 Part of #4610
Showing
- src/box/error.cc 7 additions, 8 deletionssrc/box/error.cc
- src/box/error.h 1 addition, 3 deletionssrc/box/error.h
- src/box/index.cc 2 additions, 2 deletionssrc/box/index.cc
- src/box/mp_error.cc 3 additions, 4 deletionssrc/box/mp_error.cc
- src/lib/core/diag.c 1 addition, 0 deletionssrc/lib/core/diag.c
- src/lib/core/diag.h 2 additions, 0 deletionssrc/lib/core/diag.h
- src/lua/error.lua 2 additions, 1 deletionsrc/lua/error.lua
- test/engine/func_index.result 2 additions, 1 deletiontest/engine/func_index.result
- test/unit/mp_error.cc 1 addition, 1 deletiontest/unit/mp_error.cc
Loading
Please register or sign in to comment