Skip to content
Snippets Groups Projects
Commit 9d28d372 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

iproto: remove exception handling code

Getting rid of C++ exception is our long term goal. This commit removes
the exceptions from the IPROTO code as follows:

- Make iproto_set_msg_max return -1 instead of raising an exception
  on error. Update box_set_net_msg_max accordingly.
- Make box_process_auth return -1 instead of raising an exception on
  error. Move it along with box_process_vote (which never fails) to
  the extern "C" namespace.
- Remove try/catch from iproto_connection_on_input, tx_process_misc,
  tx_process_connect. Use a label instead.
- Panic instead of raising an exception on an error starting an IPROTO
  thread in iproto_init. It should be fine because the function is
  called only at startup and shouldn't normally fail.
- Remove try/catch from iproto_do_cfg_f. It turns out that this function
  never fails so we don't even need to use an error label.
- Drop iproto_do_cfg_crit and move the assertion to iproto_do_cfg
  because this function should never fail and so we don't need the
  wrapper.

After this commit, the only exception-handling piece of code left in
IPROTO is tx_process_replication. Dropping it would entail patching
replication, relay, and recovery code so it was postponed.

NO_DOC=code cleanup
NO_TEST=code cleanup
NO_CHANGELOG=code cleanup
parent defdcff6
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