Try to use result_error_handler instead of duplication of std::function declaration