diff options
author | David Garcia Quintas <dgq@google.com> | 2015-10-19 15:41:42 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2015-10-19 15:41:42 -0700 |
commit | b5ab8a29f5e996c6be65212081cc219f100f57fb (patch) | |
tree | 162021ee2d2932bb193a53426a020576d623b291 /src/node/ext/call.h | |
parent | c22adbcd1f67b652faafebf3e95809b755037ca8 (diff) | |
parent | e2a1bf46f975a47497977a19a556dd9f07ae944a (diff) |
Merge branch 'master' of github.com:grpc/grpc into microchannels
Diffstat (limited to 'src/node/ext/call.h')
-rw-r--r-- | src/node/ext/call.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/node/ext/call.h b/src/node/ext/call.h index dd6c38e4f8..1e3c3ba18d 100644 --- a/src/node/ext/call.h +++ b/src/node/ext/call.h @@ -53,18 +53,7 @@ using std::shared_ptr; typedef Nan::Persistent<v8::Value, Nan::CopyablePersistentTraits<v8::Value>> PersistentValue; -/** - * Helper function for throwing errors with a grpc_call_error value. - * Modified from the answer by Gus Goose to - * http://stackoverflow.com/questions/31794200. - */ -inline v8::Local<v8::Value> nanErrorWithCode(const char *msg, - grpc_call_error code) { - Nan::EscapableHandleScope scope; - v8::Local<v8::Object> err = Nan::Error(msg).As<v8::Object>(); - Nan::Set(err, Nan::New("code").ToLocalChecked(), Nan::New<v8::Uint32>(code)); - return scope.Escape(err); -} +v8::Local<v8::Value> nanErrorWithCode(const char *msg, grpc_call_error code); v8::Local<v8::Value> ParseMetadata(const grpc_metadata_array *metadata_array); |