Namespaces | Macros | Functions
protobuf/src/google/protobuf/stubs/status_macros.h File Reference
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/status.h>
#include <google/protobuf/stubs/statusor.h>
Include dependency graph for protobuf/src/google/protobuf/stubs/status_macros.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 google
 
 google::protobuf
 
 google::protobuf::util
 

Macros

#define ASSIGN_OR_RETURN(lhs, rexpr)
 
#define ASSIGN_OR_RETURN_IMPL(status, lhs, rexpr)
 
#define RETURN_IF_ERROR(expr)
 
#define STATUS_MACROS_CONCAT_NAME(x, y)   STATUS_MACROS_CONCAT_NAME_INNER(x, y)
 
#define STATUS_MACROS_CONCAT_NAME_INNER(x, y)   x##y
 

Functions

template<typename T >
Status google::protobuf::util::DoAssignOrReturn (T &lhs, StatusOr< T > result)
 

Macro Definition Documentation

◆ ASSIGN_OR_RETURN

#define ASSIGN_OR_RETURN (   lhs,
  rexpr 
)
Value:
STATUS_MACROS_CONCAT_NAME(_status_or_value, __COUNTER__), lhs, rexpr);

Definition at line 81 of file protobuf/src/google/protobuf/stubs/status_macros.h.

◆ ASSIGN_OR_RETURN_IMPL

#define ASSIGN_OR_RETURN_IMPL (   status,
  lhs,
  rexpr 
)
Value:
Status status = DoAssignOrReturn(lhs, (rexpr)); \
if (PROTOBUF_PREDICT_FALSE(!status.ok())) return status;

Definition at line 68 of file protobuf/src/google/protobuf/stubs/status_macros.h.

◆ RETURN_IF_ERROR

#define RETURN_IF_ERROR (   expr)
Value:
do { \
/* Using _status below to avoid capture problems if expr is "status". */ \
if (PROTOBUF_PREDICT_FALSE(!_status.ok())) return _status; \
} while (0)

Definition at line 49 of file protobuf/src/google/protobuf/stubs/status_macros.h.

◆ STATUS_MACROS_CONCAT_NAME

#define STATUS_MACROS_CONCAT_NAME (   x,
  y 
)    STATUS_MACROS_CONCAT_NAME_INNER(x, y)

◆ STATUS_MACROS_CONCAT_NAME_INNER

#define STATUS_MACROS_CONCAT_NAME_INNER (   x,
  y 
)    x##y
status
absl::Status status
Definition: rls.cc:251
google::protobuf::util::DoAssignOrReturn
Status DoAssignOrReturn(T &lhs, StatusOr< T > result)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/status_macros.h:61
STATUS_MACROS_CONCAT_NAME
#define STATUS_MACROS_CONCAT_NAME(x, y)
Definition: protobuf/src/google/protobuf/stubs/status_macros.h:58
grpc._server._status
def _status(rpc_event, state, serialized_response)
Definition: grpc/_server.py:529
ASSIGN_OR_RETURN_IMPL
#define ASSIGN_OR_RETURN_IMPL(status, lhs, rexpr)
Definition: protobuf/src/google/protobuf/stubs/status_macros.h:68
grpc::protobuf::util::Status
GRPC_CUSTOM_UTIL_STATUS Status
Definition: include/grpcpp/impl/codegen/config_protobuf.h:93
absl::Status::ok
ABSL_MUST_USE_RESULT bool ok() const
Definition: third_party/abseil-cpp/absl/status/status.h:802


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:32