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
Loading
Please register or sign in to comment