diff options
author | Yash Tibrewal <yashkt@google.com> | 2018-08-21 16:25:40 -0700 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2018-08-21 16:25:40 -0700 |
commit | 1cfd81a604699d6ab8095c90e7da5fc588bb3048 (patch) | |
tree | 7d9899debc22889ac45d6a43531fe38224cf512a /src/core/lib/iomgr/error.h | |
parent | 97ceb5962cc5317b262aa60b8863c7df7799f640 (diff) |
Explain the newer semantics of grpc_error_add_child
Diffstat (limited to 'src/core/lib/iomgr/error.h')
-rw-r--r-- | src/core/lib/iomgr/error.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index e5369695c9..49f4029bc2 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -185,6 +185,13 @@ bool grpc_error_get_str(grpc_error* error, grpc_error_strs which, /// error occurring. Allows root causing high level errors from lower level /// errors that contributed to them. The src error takes ownership of the /// child error. +/// +/// Edge Conditions - +/// 1) If either of \a src or \a child is GRPC_ERROR_NONE, returns a reference +/// to the other argument. 2) If both \a src and \a child are GRPC_ERROR_NONE, +/// returns GRPC_ERROR_NONE. 3) If \a src and \a child point to the same error, +/// returns a single reference. (Note that, 2 references should have been +/// received to the error in this case.) grpc_error* grpc_error_add_child(grpc_error* src, grpc_error* child) GRPC_MUST_USE_RESULT; |