aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/core/grpc-error.md
diff options
context:
space:
mode:
authorGravatar Bill Feng <yfen@google.com>2018-08-24 09:49:44 -0700
committerGravatar Bill Feng <yfen@google.com>2018-08-24 09:49:44 -0700
commitb47406a48894a12f8710a15f674e8438546f6970 (patch)
tree50fef588c751129dde6513935ce23e8ef526dcdb /doc/core/grpc-error.md
parent5be7304b06cfa197c0d63ab0972026745a2c0919 (diff)
parent35479b8a80c9c47937dbda2dfe173fc2c3b91873 (diff)
Merge branch 'master' into feature/qps-bazel-test
Diffstat (limited to 'doc/core/grpc-error.md')
-rw-r--r--doc/core/grpc-error.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/core/grpc-error.md b/doc/core/grpc-error.md
index 49a95b353c..105a648284 100644
--- a/doc/core/grpc-error.md
+++ b/doc/core/grpc-error.md
@@ -56,7 +56,7 @@ For example, in the following code block, error1 and error2 are owned by the
current function.
```C
-grpc_error* error1 = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occured");
+grpc_error* error1 = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occurred");
grpc_error* error2 = some_operation_that_might_fail(...);
```
@@ -87,7 +87,7 @@ callbacks with `GRPC_CLOSURE_RUN` and `GRPC_CLOSURE_SCHED`. These functions are
not callbacks, so they will take ownership of the error passed to them.
```C
-grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occured");
+grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occurred");
GRPC_CLOSURE_RUN(exec_ctx, cb, error);
// current function no longer has ownership of the error
```
@@ -96,7 +96,7 @@ If you schedule or run a closure, but still need ownership of the error, then
you must explicitly take a reference.
```C
-grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occured");
+grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occurred");
GRPC_CLOSURE_RUN(exec_ctx, cb, GRPC_ERROR_REF(error));
// do some other things with the error
GRPC_ERROR_UNREF(error);
@@ -128,7 +128,7 @@ void on_some_action(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
Take the following example:
```C
-grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occured");
+grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occurred");
// do some things
some_function(error);
// can't use error anymore! might be gone.