diff options
author | Noah Eisen <ncteisen@gmail.com> | 2017-11-21 07:35:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-21 07:35:32 -0800 |
commit | dd010f2297560edcfa863c90988020ade485f53a (patch) | |
tree | 4b464ba1969313b1e00920a7a61b17ec59938fe8 /include | |
parent | 39b0325dc7770b3325a3604b62120f1e9fed301e (diff) | |
parent | 11c1c47fe95e6ec8c9ff97d1e702561eee36434e (diff) |
Merge pull request #13364 from ncteisen/surfacing-error-details
Add Error String to Recv Status API
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc++/impl/codegen/call.h | 1 | ||||
-rw-r--r-- | include/grpc/impl/codegen/grpc_types.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index 1a988297dc..41e95866cf 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -579,6 +579,7 @@ class CallOpClientRecvStatus { op->data.recv_status_on_client.trailing_metadata = metadata_map_->arr(); op->data.recv_status_on_client.status = &status_code_; op->data.recv_status_on_client.status_details = &error_message_; + op->data.recv_status_on_client.error_string = nullptr; op->flags = 0; op->reserved = NULL; } diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 03be610d25..c8c1437c91 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -558,6 +558,10 @@ typedef struct grpc_op { grpc_metadata_array* trailing_metadata; grpc_status_code* status; grpc_slice* status_details; + /** If this is not nullptr, it will be populated with the full fidelity + * error string for debugging purposes. The application is responsible + * for freeing the data. */ + const char** error_string; } recv_status_on_client; struct grpc_op_recv_close_on_server { /** out argument, set to 1 if the call failed in any way (seen as a |