GRPC C++  1.30.0
Public Member Functions | Static Public Attributes
grpc::Status Class Reference

Did it work? If it didn't, why? More...

#include <status.h>

Public Member Functions

 Status ()
 Construct an OK instance. More...
 
 Status (StatusCode code, const grpc::string &error_message)
 Construct an instance with associated code and error_message. More...
 
 Status (StatusCode code, const grpc::string &error_message, const grpc::string &error_details)
 Construct an instance with code, error_message and error_details. More...
 
StatusCode error_code () const
 Return the instance's error code. More...
 
grpc::string error_message () const
 Return the instance's error message. More...
 
grpc::string error_details () const
 Return the (binary) error details. More...
 
bool ok () const
 Is the status OK? More...
 
void IgnoreError () const
 

Static Public Attributes

static const StatusOK
 An OK pre-defined instance. More...
 
static const StatusCANCELLED
 A CANCELLED pre-defined instance. More...
 

Detailed Description

Did it work? If it didn't, why?

See grpc::StatusCode for details on the available code and their meaning.

Constructor & Destructor Documentation

◆ Status() [1/3]

grpc::Status::Status ( )
inline

Construct an OK instance.

◆ Status() [2/3]

grpc::Status::Status ( StatusCode  code,
const grpc::string error_message 
)
inline

Construct an instance with associated code and error_message.

It is an error to construct an OK status with non-empty error_message.

◆ Status() [3/3]

grpc::Status::Status ( StatusCode  code,
const grpc::string error_message,
const grpc::string error_details 
)
inline

Construct an instance with code, error_message and error_details.

It is an error to construct an OK status with non-empty error_message and/or error_details.

Member Function Documentation

◆ error_code()

StatusCode grpc::Status::error_code ( ) const
inline

Return the instance's error code.

◆ error_details()

grpc::string grpc::Status::error_details ( ) const
inline

Return the (binary) error details.

◆ error_message()

grpc::string grpc::Status::error_message ( ) const
inline

Return the instance's error message.

◆ IgnoreError()

void grpc::Status::IgnoreError ( ) const
inline

◆ ok()

bool grpc::Status::ok ( ) const
inline

Is the status OK?

Field Documentation

◆ CANCELLED

const Status& grpc::Status::CANCELLED
static

A CANCELLED pre-defined instance.

◆ OK

const Status& grpc::Status::OK
static

An OK pre-defined instance.


The documentation for this class was generated from the following file: