feat(server): Implement robust error & cancellation on replica (#531)

This commit is contained in:
Vladislav 2022-12-11 12:11:25 +03:00 committed by GitHub
parent a0fe3c3dcc
commit f98d6f3357
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 377 additions and 159 deletions

View file

@ -6,6 +6,7 @@
#include <atomic>
#include <string>
#include <system_error>
#include "facade/error.h"
@ -21,7 +22,7 @@ using facade::kWrongTypeErr;
#define RETURN_ON_ERR(x) \
do { \
auto __ec = (x); \
std::error_code __ec = (x); \
if (__ec) { \
LOG(ERROR) << "Error " << __ec << " while calling " #x; \
return __ec; \