#include #include void Method(const v8::FunctionCallbackInfo& args) { v8::Isolate* isolate = args.GetIsolate(); v8::HandleScope scope(isolate); args.GetReturnValue().Set(node::ErrnoException(isolate, 10, "syscall", "some error msg", "päth")); } void init(v8::Local exports) { NODE_SET_METHOD(exports, "errno", Method); } NODE_MODULE(NODE_GYP_MODULE_NAME, init)