• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <node.h>
2 #include <v8.h>
3 
Method(const v8::FunctionCallbackInfo<v8::Value> & args)4 void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
5   v8::Isolate* isolate = args.GetIsolate();
6   v8::HandleScope scope(isolate);
7   args.GetReturnValue().Set(node::ErrnoException(isolate,
8                                                 10,
9                                                 "syscall",
10                                                 "some error msg",
11                                                 "päth"));
12 }
13 
init(v8::Local<v8::Object> exports)14 void init(v8::Local<v8::Object> exports) {
15   NODE_SET_METHOD(exports, "errno", Method);
16 }
17 
18 NODE_MODULE(NODE_GYP_MODULE_NAME, init)
19