Skip to content
Snippets Groups Projects
Commit bae634bb authored by Vladislav Shpilevoy's avatar Vladislav Shpilevoy Committed by Kirill Yukhin
Browse files

tuple: rework update error reporting

- Unify error code names, they all should start with ER_UPDATE_*;

- Use string field identifier in error messages, because soon they
  will support both field numbers and JSON paths;

- Report all field numbers 1-based. This simplifies error analysis
  because no need to think from where an update has come - Lua or
  C/iproto. Also it allows to drop index_base argument from many
  functions;

- Introduce helper functions to set commonly appearing errors.
  Currently it is not a problem, but next patches will add several
  new files in all of which the same errors can happen;

- Deletion checks that number of fields to delete is > 0 right
  after reading the argument, not during deletion appliance. It
  allows to make such check in only one place even when more
  delete implementations will appear;

- make_arith_operation now takes update_op as an argument
  explicitly, not teared into separate arguments. It allows to use
  error helpers. Also dead code is dropped from this function with
  incorrect usage of some of errors;

Part of #1261
parent d5c8298d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment