diff options
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); |