RESTinio
|
Type of a function to be used as the default on_error-callback. More...
#include <http_server_run.hpp>
Public Member Functions | |
void | operator() (std::exception_ptr) const noexcept |
Type of a function to be used as the default on_error-callback.
Since v.0.7.0 on_pool_runner_t::stop() accept a on_error callback that will be passed to http_server_t::close_async() and will be called if an exception is thrown in http_server_t::close_async(). This callback should perform some actions that can help the application to handle the problem.
This type is intended to be used as the default on_error callback.
If an exception in thrown inside http_server_t::close_async() then the application is in undefined state, it's unknown what can be done with http_server_t instance and whan can't be.
Therefore the default on_error callback simply calls std::abort() to terminate the application and avoid the work in undefined state.
If such behavour is not desirable the user can provide own on_error callback.
Definition at line 712 of file http_server_run.hpp.
|
inlinenoexcept |
Definition at line 720 of file http_server_run.hpp.